summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe_hnd.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
committerJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
commit693ffb8466ada58ecc59fde754ba79fc6f51528d (patch)
tree639fae54b3d874aae78e5732aef20f52de5b60bf /source3/rpc_server/srv_pipe_hnd.c
parent830a9e571eee5330097376e94af7dc0f2d5f2f02 (diff)
downloadsamba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.gz
samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.bz2
samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.zip
Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 2d11c5eda5..7110342383 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -144,7 +144,7 @@ static void attempt_remote_rpc_connect(pipes_struct *p)
*/
become_root(False); /* to connect to pipe */
- p->m = msrpc_use_add(p->name, getpid(), &usr, False);
+ p->m = msrpc_use_add(p->name, sys_getpid(), &usr, False);
unbecome_root(False);
if (p->m == NULL)
@@ -170,7 +170,7 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name,
log files and prevents client bugs where pipe numbers are reused
over connection restarts */
if (next_pipe == 0)
- next_pipe = (getpid() ^ time(NULL)) % MAX_OPEN_PIPES;
+ next_pipe = (sys_getpid() ^ time(NULL)) % MAX_OPEN_PIPES;
i = bitmap_find(bmap, next_pipe);