Skip to content

Commit b967c09

Browse files
committed
sys: daemon support Unix only for the moment
1 parent 2621ec1 commit b967c09

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

include/chen/base/regex.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
22
* Created by Jian Chen
3-
* @since 2016.04.29
4-
* @author Jian Chen <admin@chensoft.com>
5-
* @link http://chensoft.com
3+
* @since 2016.04.29
4+
* @author Jian Chen <admin@chensoft.com>
5+
* @link http://chensoft.com
6+
* @caution regex is incomplete in some compilers, like gcc 4.8.x
67
*/
78
#pragma once
89

@@ -11,10 +12,6 @@
1112

1213
namespace chen
1314
{
14-
/**
15-
* @caution, regex is incomplete in some compilers, like gcc 4.8.x
16-
* make sure your compiler has fully support for regex
17-
*/
1815
class regex
1916
{
2017
public:

include/chen/sys/sys.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ namespace chen
2525
* the current directory will change to '/' on Unix
2626
* standard file descriptors will be closed
2727
* @link http://www.netzmafia.de/skripten/unix/linux-daemon-howto.html
28+
* @caution support Unix only
2829
*/
30+
#ifndef _WIN32
2931
static void daemon();
32+
#endif
3033

3134
/**
3235
* UUID string

src/plat/win/sys_win.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ std::string sys::error()
1414
{
1515
char buf[1024] = {0};
1616
return errno && !::strerror_s(buf, sizeof(buf), errno) ? std::string(buf) : "No error";
17-
}
18-
19-
void sys::daemon()
20-
{
21-
// todo not implement
2217
}

0 commit comments

Comments
 (0)