Patch: Init scripts PID format

Tobias Burnus <[email protected]>
Newsgroups gmane.linux.lsb.discuss
Message-ID <[email protected]>
Hi,

this patch should make Mark Hatle happier and should solve this issue:
  [ 765901 ] PID format not defined (PID file + pidofproc)
http://sourceforge.net/tracker/index.php?func=detail&aid=765901&group_id=1107&atid=101107

Mark Hatle wrote:
>>Specifies that /var/run/basename.pid shall be used.  But I don't see a
>>format to this specified anywhere.  I am assuming that the format is
>>single line, with whitespace seperating pids, such as: "X Y Z" (where
>>X,Y and Z are 3 pids that basename occupies.)

I think the wording should be ok, but it can be made more precise: (-;
- Internal Field Separator (PID separator): Space
- Single Line, determinated by a "\n"
- The PID should output non-binary in decimal representation
  (what else ;-): printf "%d" $PID
- pidofproc should output "" if no PID could be found.

but the wording in the patch should be sufficient.


Tobias

PS: This patch contains again the spellfix patch:
  It shall return 0 if the program is
 -the process is running and not 0 otherwise.
 +running and not 0 otherwise.
init-3.diff (text/plain, 1.3 KB)
Index: initfunctions.sgml
===================================================================
RCS file: /cvsroot/lsb/spec/wip/sysinit/initfunctions.sgml,v
retrieving revision 1.3
diff -u -r1.3 initfunctions.sgml
--- initfunctions.sgml	17 Jun 2003 17:57:56 -0000	1.3
+++ initfunctions.sgml	8 Jul 2003 18:21:14 -0000
@@ -18,8 +18,8 @@
 
 <MEMBER>
 This runs the specified program as a daemon.
-start_daemon will check to see if there is a program
-named "daemon" already running.  If so, it will not
+start_daemon will check to see if the program is already running
+using the algorithm given by pidofproc. If so, it will not
 start another copy of the daemon unless the -f
 option is given. The -n option specifies a nice
 level. See nice(1).
@@ -66,10 +66,10 @@
 potential security exposure).  Hence, LSB-complaint
 applications who wish to use the pidofproc function
 in their init scripts must store the pid in
-/var/run/basename.pid.
+/var/run/basename.pid; multiple pids should be separated by a single space.
 pidofproc should return the LSB defined exist status
 codes for "status". It shall return 0 if the program is
-the process is running and not 0 otherwise.
+running and not 0 otherwise.
 </MEMBER>
 
 <MEMBER>log_success_msg "message"</MEMBER>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.