patchmldonkey, a multi-networks file-sharing client - Patches: patch #4449, New parameter for pid file: -pid...

 
 

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

patch #4449: New parameter for pid file: -pid <dir>, small improvements for pid files

Submitter:  Moonskin <mgiritli>
Submitted:  Tue 20 Sep 2005 07:36:17 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sun 09 Oct 2005 05:58:33 PM UTC, comment #7: 

"What about making pid file path a compile time option ?"
I donĀ“t think this is a good idea, changing pid path requires
a re-compile. Most Unix daemons have a -pid parameter.

"I'm not too fond of checking config_files_space.tmp..."
This is the only way to block using a directory which is already
in use by MLDonkey. Do you know an alternative? For me its clear,
if config_files_space.tmp exists, MLDonkey is using this dir or
was not properly stopped. Both requires user intervention.

spiralvoice <spiralvoice>
Group administrator
Thu 29 Sep 2005 02:12:58 PM UTC, comment #6: 

I'm not too fond of checking config_files_space.tmp... What about making pid file path a compile time option ?
Also, pid files are traditionally checked for freshness by reading the PID they contain, and use kill -0 to check if the process exists.
Don't know if this will work on all platforms however :/

pango <mlpango>
Group Member
Tue 20 Sep 2005 10:43:14 PM UTC, comment #5: 

Applied 2005/09/21

spiralvoice <spiralvoice>
Group administrator
Tue 20 Sep 2005 07:58:16 PM UTC, comment #4: 

This patch introduces a new parameter for the directory of the pid file, this works only on non-Windows platforms.

Also a pid file is written on Windows now to avoid having several
MLDonkey processes working in the same data directory.

The name of the pid file is now the same as the name of the MLDonkey binary with extension ".pid".

Because the pid file can now be present in a different directory
the presence for the file "config_files_space.tmp" is also checked
on startup to avoid having several MLDonkey processes working in
the same data directory.

Think of this scenario:
gentoo mldonkey # ./mlnet -pid /var/run
2005/09/20 21:53:13 Starting MLDonkey 2.6.4.CVS ...
2005/09/20 21:53:13 MLDonkey is working in /root/.mldonkey
...

gentoo mldonkey # ./mlnet
2005/09/20 21:53:55 Starting MLDonkey 2.6.4.CVS ...
2005/09/20 21:53:55 MLDonkey is working in /root/.mldonkey
2005/09/20 21:53:55 /root/.mldonkey/config_files_space.tmp exists.
(Core exits)

or

gentoo mldonkey # ./mlnet
2005/09/20 21:55:43 Starting MLDonkey 2.6.4.CVS ...
2005/09/20 21:55:43 MLDonkey is working in /root/.mldonkey
...

gentoo mldonkey # ./mlnet.static
2005/09/20 21:55:54 Starting MLDonkey 2.6.4.CVS ...
2005/09/20 21:55:54 MLDonkey is working in /root/.mldonkey
2005/09/20 21:55:54 /root/.mldonkey/config_files_space.tmp exists.
(Core exits, this happens because pid file is now called mlnet.static.pid)

spiralvoice <spiralvoice>
Group administrator
Tue 20 Sep 2005 07:36:17 PM UTC, comment #3: 

This item has been reassigned from the project mldonkey, a multi-networks file-sharing client task tracker to your tracker.

The original report is still available at task #4553

Following are the information included in the original report:

[field #0]                  Item ID: 4553
[field #1]                 Group ID: 1409
[field #2]              Open/Closed: Open
[field #3]                 Severity: 3 - Normal
[field #4]                  Privacy: Public
[field #6]                 Category: None
[field #7]             Submitted by: mgiritli
[field #8]              Assigned to: None
[field #9]             Submitted on: Mi 24.08.2005 um 20:46
[field #10]                  Summary: accept custom pid file directory
[field #11]      Original Submission: This also came up in the gentoo bugzilla a while ago. However here is perhaps a more appropriate place for discussing it.

MLdonkey should allow a custom directory (eg. /var/run for linux) for creation of a pid file inside it. The usual way of doing this with many other daemons that do use a pid file is to get it through the command line arguments during startup. Examples are: ntp, spamd, courier, openvpn, privoxy, etc.

If no directory is given during startup, then mldonkey should default to homedir.

Regards.
[field #13]               Item Group: None
[field #14]                   Status: None
[field #15]        Component Version: None
[field #16]         Platform Version: None
[field #17]          Reproducibility: None
[field #18]               Size (loc): None
[field #19]            Fixed Release: None
[field #20]          Planned Release: None
[field #21]                   Effort: 0.00
[field #25]                 Priority: 5 - Normal
[field #26]          Should Start On: Do 25.08.2005 um 00:00
[field #27]    Should be Finished on: Do 25.08.2005 um 00:00
[field #28]         Percent Complete: 0%
[field #30]                  Release: None
[field #55]     Custom Select Box #1: None
[field #56]     Custom Select Box #2: None
[field #57]     Custom Select Box #3: None
[field #58]     Custom Select Box #4: None
[field #59]     Custom Select Box #5: None
[field #60]     Custom Select Box #6: None
[field #61]     Custom Select Box #7: None
[field #62]     Custom Select Box #8: None
[field #63]     Custom Select Box #9: None
[field #64]    Custom Select Box #10: None

spiralvoice <spiralvoice>
Group administrator
Wed 24 Aug 2005 06:46:13 PM UTC, comment #2: 

This item has been reassigned from the project mldonkey, a multi-networks file-sharing client bugs tracker to your tracker.

The original report is still available at bugs #14270

Following are the information included in the original report:

[field #0]                  Item ID: 14270
[field #1]                 Group ID: 1409
[field #2]              Open/Closed: Open
[field #3]                 Severity: 3 - Normal
[field #4]                  Privacy: Public
[field #5]                 Category: Core
[field #6]             Submitted by: mgiritli
[field #7]              Assigned to: None
[field #8]             Submitted on: Mi 24.08.2005 um 14:52
[field #9]                  Summary: accept custom pid file directory
[field #10]      Original Submission: This also came up in the gentoo bugzilla a while ago. However here is perhaps a more appropriate place for discussing it.

MLdonkey should allow a custom directory (eg. /var/run for linux) for creation of a pid file inside it. The usual way of doing this with many other daemons that do use a pid file is to get it through the command line arguments during startup. Examples are: ntp, spamd, courier, openvpn, privoxy, etc.

If no directory is given during startup, then mldonkey should default to homedir.

Regards.
[field #12]               Item Group: Feature request
[field #13]                   Status: None
[field #14]        Component Version: None
[field #15]         Platform Version: Linux
[field #16]          Reproducibility: None
[field #17]               Size (loc): None
[field #18]            Fixed Release: None
[field #19]          Planned Release: None
[field #20]                   Effort: 0.00
[field #24]                 Priority: 5 - Normal
[field #27]         Percent Complete: 0%
[field #29]                  Release: None
[field #54]          Binaries Origin: None
[field #55]                 CPU type: Intel x86
[field #56]                      CPU: None
[field #57]     Custom Select Box #4: None
[field #58]     Custom Select Box #5: None
[field #59]     Custom Select Box #6: None
[field #60]     Custom Select Box #7: None
[field #61]     Custom Select Box #8: None
[field #62]     Custom Select Box #9: None
[field #63]    Custom Select Box #10: None

spiralvoice <spiralvoice>
Group administrator
Wed 24 Aug 2005 06:46:12 PM UTC, comment #1: 

Moved to the task tracker as this is a feature request.
I will try to code something for it in the next week or so.

spiralvoice <spiralvoice>
Group administrator
Tue 20 Sep 2005 07:36:17 PM UTC, original submission:  

This also came up in the gentoo bugzilla a while ago. However here is perhaps a more appropriate place for discussing it.

MLdonkey should allow a custom directory (eg. /var/run for linux) for creation of a pid file inside it. The usual way of doing this with many other daemons that do use a pid file is to get it through the command line arguments during startup. Examples are: ntp, spamd, courier, openvpn, privoxy, etc.

If no directory is given during startup, then mldonkey should default to homedir.

Regards.

Moonskin <mgiritli>

 

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

Attached Files
file #8153:  check_stalled_pidfile.patch added by mlpango (2KiB - text/x-patch)
file #8868:  pid.patch added by spiralvoice (4KiB - application/octet-stream)

 

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 10 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-10-09 spiralvoice StatusIn Progress Done
    Open/ClosedOpen Closed
2005-10-06 spiralvoice StatusDone In Progress
    Open/ClosedClosed Open
2005-09-29 mlpango Attached File- Added check_stalled_pidfile.patch, #5263
2005-09-20 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2005-09-20 spiralvoice Attached File- Added pid.patch, #5215
2005-09-20 spiralvoice SummaryReassigned item: accept custom pid file directory New parameter for pid file: -pid <dir>, small improvements for pid files
2005-09-20 spiralvoice Reassign itemFrom group mldonkey, a multi-networks file-sharing client, task tracker To group mldonkey, a multi-networks file-sharing client, patch tracker

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code