summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-20 16:31:18 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-20 16:31:18 +0800
commit77251793d3e2a6756ed08cd5d62606d1fb4100dc (patch)
tree1d7a71fa62f07460d611ad9309573ef10f8bad82
parent34cf57ef87003c70803627584de6ca152bf107e5 (diff)
downloadpttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar.gz
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar.bz2
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar.lz
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar.xz
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.tar.zst
pttbbs-77251793d3e2a6756ed08cd5d62606d1fb4100dc.zip
process argv[] before setproctitle()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3068 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/shmctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/shmctl.c b/util/shmctl.c
index 16fb4414..0822447b 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -457,13 +457,14 @@ int utmpsortd(int argc, char **argv)
return 0;
}
-#ifndef VALGRIND
- setproctitle("shmctl utmpsortd");
-#endif
if( argc < 2 || (interval = atoi(argv[1])) < 500000 )
interval = 1000000; // default to 1 sec
sortall = ((argc < 3) ? 1 : atoi(argv[2]));
+#ifndef VALGRIND
+ setproctitle("shmctl utmpsortd");
+#endif
+
while( 1 ){
if( (pid = fork()) != 0 ){
int s;