diff options
author | Jeremy Allison <jra@samba.org> | 2000-05-02 02:23:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-05-02 02:23:41 +0000 |
commit | 693ffb8466ada58ecc59fde754ba79fc6f51528d (patch) | |
tree | 639fae54b3d874aae78e5732aef20f52de5b60bf /source3/client/client.c | |
parent | 830a9e571eee5330097376e94af7dc0f2d5f2f02 (diff) | |
download | samba-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/client/client.c')
-rw-r--r-- | source3/client/client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index ade1436871..7431b2704e 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -849,7 +849,7 @@ static void cmd_more(void) fstrcat(rname,"\\"); slprintf(tmpname, sizeof(fstring)-1, - "%s/smbmore.%d",tmpdir(),(int)getpid()); + "%s/smbmore.%d",tmpdir(),(int)sys_getpid()); fstrcpy(lname,tmpname); if (!next_token(NULL,rname+strlen(rname),NULL,sizeof(rname)-strlen(rname))) { @@ -1159,7 +1159,7 @@ static void cmd_mput(void) FILE *f; slprintf(tmpname,sizeof(pstring)-1, - "%s/ls.smb.%d",tmpdir(),(int)getpid()); + "%s/ls.smb.%d",tmpdir(),(int)sys_getpid()); if (recurse) slprintf(cmd,sizeof(pstring)-1, "find . -name \"%s\" -print > %s",p,tmpname); @@ -1269,11 +1269,11 @@ static void cmd_print(void) pstrcpy(rname,lname); p = strrchr(rname,'/'); if (p) { - slprintf(rname, sizeof(rname)-1, "%s-%d", p+1, (int)getpid()); + slprintf(rname, sizeof(rname)-1, "%s-%d", p+1, (int)sys_getpid()); } if (strequal(lname,"-")) { - slprintf(rname, sizeof(rname)-1, "stdin-%d", (int)getpid()); + slprintf(rname, sizeof(rname)-1, "stdin-%d", (int)sys_getpid()); } do_put(rname, lname); |