summaryrefslogtreecommitdiffstats
path: root/source/lib/substitute.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
commit148628b616b5c29ba6340d65fc3ddbcabba6e67a (patch)
treef8482fb2dcfa68baeb38a38e2c73ee105abb00a2 /source/lib/substitute.c
parent3b25f7368be3877e9ad27498bc9451ec88d4b07f (diff)
downloadsamba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.tar.gz
samba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.tar.xz
samba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.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.
Diffstat (limited to 'source/lib/substitute.c')
-rw-r--r--source/lib/substitute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index c43c133d6ad..2a575f0c382 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -176,7 +176,7 @@ void standard_sub_basic(char *str)
case 'T' : string_sub(p,"%T", timestring(False),l); break;
case 'a' : string_sub(p,"%a", remote_arch,l); break;
case 'd' :
- slprintf(pidstr,sizeof(pidstr), "%d",(int)getpid());
+ slprintf(pidstr,sizeof(pidstr), "%d",(int)sys_getpid());
string_sub(p,"%d", pidstr,l);
break;
case 'h' : string_sub(p,"%h", myhostname(),l); break;