summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-08-14 02:23:20 +0000
committerjsorg71 <jsorg71>2005-08-14 02:23:20 +0000
commitb51098f5212b41832578f523df77a80c0bd4236f (patch)
tree2b90c0e31cc47a645977400966ed0cc28c98e468 /common
parentc3ff1bcebbe08abbd64067209e388a91dbc402c3 (diff)
downloadxrdp-proprietary-b51098f5212b41832578f523df77a80c0bd4236f.tar.gz
xrdp-proprietary-b51098f5212b41832578f523df77a80c0bd4236f.zip
add pos and unset_signals funcs
Diffstat (limited to 'common')
-rw-r--r--common/os_calls.c24
-rw-r--r--common/os_calls.h4
2 files changed, 28 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 838e60ec..6b90ffc9 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -674,6 +674,20 @@ g_atoi(char* str)
}
/*****************************************************************************/
+int
+g_pos(char* str, char* to_find)
+{
+ char* pp;
+
+ pp = strstr(str, to_find);
+ if (pp == 0)
+ {
+ return -1;
+ }
+ return (pp - str);
+}
+
+/*****************************************************************************/
long
g_load_library(char* in)
{
@@ -780,6 +794,16 @@ g_signal_child_stop(void (*func)(int))
}
/*****************************************************************************/
+void
+g_unset_signals(void)
+{
+ sigset_t mask;
+
+ sigemptyset(&mask);
+ sigprocmask(SIG_SETMASK, &mask, NULL);
+}
+
+/*****************************************************************************/
int
g_fork(void)
{
diff --git a/common/os_calls.h b/common/os_calls.h
index af300817..de369246 100644
--- a/common/os_calls.h
+++ b/common/os_calls.h
@@ -117,6 +117,8 @@ int
g_strncmp(char* c1, char* c2, int len);
int
g_atoi(char* str);
+int
+g_pos(char* str, char* to_find);
long
g_load_library(char* in);
int
@@ -136,6 +138,8 @@ void
g_signal(int sig_num, void (*func)(int));
void
g_signal_child_stop(void (*func)(int));
+void
+g_unset_signals(void);
int
g_fork(void);
int