diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-24 20:17:08 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-24 21:55:40 +0100 |
commit | c0288e0612187ecbfc4a81d071fd504ea8737b7a (patch) | |
tree | d9928183d4eeca7c9aa55e4aabb91465fb72f09a /source3/lib/util.c | |
parent | 55bd27935fe0bf31945d0137a1673499e7fcb1ad (diff) | |
download | samba-c0288e0612187ecbfc4a81d071fd504ea8737b7a.tar.gz samba-c0288e0612187ecbfc4a81d071fd504ea8737b7a.tar.bz2 samba-c0288e0612187ecbfc4a81d071fd504ea8737b7a.zip |
lib/util: Remove obsolete sys_getpid() and sys_fork().
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 9d3d787d63..7be056c68b 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -860,7 +860,7 @@ void smb_panic_s3(const char *why) int result; DEBUG(0,("PANIC (pid %llu): %s\n", - (unsigned long long)sys_getpid(), why)); + (unsigned long long)getpid(), why)); log_stack_trace(); #if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER) @@ -1985,7 +1985,7 @@ static uint32 my_vnn = NONCLUSTER_VNN; void set_my_vnn(uint32 vnn) { - DEBUG(10, ("vnn pid %d = %u\n", (int)sys_getpid(), (unsigned int)vnn)); + DEBUG(10, ("vnn pid %d = %u\n", (int)getpid(), (unsigned int)vnn)); my_vnn = vnn; } @@ -2013,7 +2013,7 @@ struct server_id pid_to_procid(pid_t pid) struct server_id procid_self(void) { - return pid_to_procid(sys_getpid()); + return pid_to_procid(getpid()); } bool procid_equal(const struct server_id *p1, const struct server_id *p2) @@ -2035,7 +2035,7 @@ bool cluster_id_equal(const struct server_id *id1, bool procid_is_me(const struct server_id *pid) { - if (pid->pid != sys_getpid()) + if (pid->pid != getpid()) return False; if (pid->task_id != 0) return False; |