patchmldonkey, a multi-networks file-sharing client - Patches: patch #3985, Create pid file

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3985: Create pid file

Submitter:  spiralvoice <spiralvoice>
Submitted:  Thu 05 May 2005 06:45:41 PM UTC
   
 
Category:  Improved interfaces Priority:  7 - High
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Tue 17 May 2005 01:19:29 PM UTC, comment #13: 

Applied 2005/05/17

spiralvoice <spiralvoice>
Group administrator
Sat 14 May 2005 08:32:30 PM UTC, comment #12: 

Patch #3991 has to be applied before this one.

spiralvoice <spiralvoice>
Group administrator
Sat 14 May 2005 08:29:24 PM UTC, comment #11: 

This should finally be the production version;-)

spiralvoice <spiralvoice>
Group administrator
Sat 14 May 2005 08:28:23 PM UTC, comment #10: 

Yet another update (YAP) which does not start the core if
mlnet.pid exists in core directory.

"PID file mlnet.pid exists in .
This means another MLDonkey process could still be working
with this directory. Please shut it down before starting
a new instance here. If you are sure no other process uses
this directory delete mlnet.pid and restart the core."

spiralvoice <spiralvoice>
Group administrator
Sat 14 May 2005 01:33:30 PM UTC, comment #9: 

Updated patch to disable it on MinGW.

spiralvoice <spiralvoice>
Group administrator
Sat 14 May 2005 12:34:53 PM UTC, comment #8: 

PID is always 948 on my machine, even after reboot using MinGW.

spiralvoice <spiralvoice>
Group administrator
Fri 13 May 2005 09:37:45 PM UTC, comment #7: 

Please test this patch before applying. I think on MinGW
it does not work, it displays always the same process number
so we have to disable this feature on that platform...

spiralvoice <spiralvoice>
Group administrator
Sun 08 May 2005 10:52:34 PM UTC, comment #6: 

second update, remove "Filename.concat file_basedir"

spiralvoice <spiralvoice>
Group administrator
Sun 08 May 2005 05:50:44 PM UTC, comment #5: 

Updated patch is online...

spiralvoice <spiralvoice>
Group administrator
Sun 08 May 2005 02:32:52 PM UTC, comment #4: 

I agree with amorphous : you should use a hardcoded name for the pidfile. The reason is simple: you can use pidfile for not starting twice the same service. But the problem here is that you will be able to run twice the same service, if it doesn't have the same name ( a link is enough to mislead the system ).

Concerning RFC/linux filesystem, it exists :
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

At least, the above specification should be used when packaging debian program.

Sylvain Le Gall <gildor>
Sun 08 May 2005 02:11:55 PM UTC, comment #3: 

That would be possible but I donĀ“t know if there is some RFC/
linux filesystem convention which defines a standard here.
All pid files I saw on my system had the same name as the binary.
As MLDonkey can have several names

(see this code section in commonOptions.ml:
( Infer which nets to start depending on the name used )
let _ =)

I thought it would be a good idea if the pid file respects the
binary filename, so I copied some part of that code to my patch.
Maybe package maintainers should have a say here also, so I posted
a comment on Gentoo bugs: http://bugs.gentoo.org/show_bug.cgi?id=84100#c20
and sent Sylvian an email.

spiralvoice <spiralvoice>
Group administrator
Fri 06 May 2005 10:17:23 PM UTC, comment #2: 

wouldn't it be better to use an hardcoded name for the pid file, that is independent of the executable? (it would not make any sense to run two executables in the same dir anyway)

Amorphous <amorphous>
Thu 05 May 2005 10:11:05 PM UTC, comment #1: 

updated patch to let Sys.remove use file_basedir like open_out.

spiralvoice <spiralvoice>
Group administrator
Thu 05 May 2005 06:45:41 PM UTC, original submission:  

File is created in the core dir (!) when !!create_pid = true,
otherwise a line is printed on core start:
"Starting with pid 5469"

Filename of the pid file is the name of the executable + ".pid",
it is deleted when the core is stopped;-)

spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #8811:  3985.patch added by spiralvoice (2KiB - application/octet-stream - updated to refuse core start if mlnet.pid exists)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 13 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-19 spiralvoice Open/ClosedOpen Closed
2005-05-19 amorphous StatusNone Done
2005-05-14 spiralvoice Attached File#4608 Removed
2005-05-14 spiralvoice Attached File- Added 3985.patch, #4610
2005-05-14 spiralvoice Attached File#4580 Removed
2005-05-14 spiralvoice Attached File- Added 3985.patch, #4608
2005-05-08 spiralvoice Attached File#4578 Removed
2005-05-08 spiralvoice Attached File- Added 3985.patch, #4580
2005-05-08 spiralvoice Attached File#4571 Removed
2005-05-08 spiralvoice Attached File- Added 3985.patch, #4578
2005-05-05 spiralvoice Attached File- Added 3985_2.patch, #4571
2005-05-05 spiralvoice Attached File#4569 Removed
2005-05-05 spiralvoice Attached File- Added pid.patch, #4569

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code