View Issue Details

IDProjectCategoryView StatusLast Update
0003994unrealircdpublic2016-01-11 18:23
Reporterwarg Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux-2.6.35 
Product Version3.2.9-RC1 
Fixed in Version4.0.1 
Summary0003994: no more stale pidfile, patch to delete pidfile on shutdown
DescriptionThe patch provided adds `unlink(IRCD_PIDFILE)'; to the end of `s_die()', just before `exit(-1);'. UnrealIRCd will no longer have a stale pidfile on SIGTERM after applying this patch. This patch also changes kill -9 (SIGKILL) to kill -15 (SIGTERM) in the unreal rc script for a clean shutdown.
Steps To ReproduceTry killing UnrealIRCd (w/o this patch) with -9 (SIGKILL) or -15 (SIGTERM, clean shutdown). The ircd.pid will still exist (stale pid). This is proper behavior for the harsh SIGKILL, but SIGTERM is much cleaner. It can be compared to unplugging your computer (stop now) vs shutting down (go through shutdown routines).
Additional InformationI know this is a very very simple patch, but I think it would be good to handle that SIGTERM and delete that pid.
TagsNo tags attached.
Attached Files
3rd party modules

Activities

ohnobinki

2010-12-31 15:03

reporter   ~0016554

unreal-3994-del-pidfile.patch: also delete pidfile when file::pidfile changes on rehash.

warg

2010-12-31 18:28

reporter   ~0016557

Thanks, binki!

katsklaw

2011-01-01 02:30

reporter   ~0016561

will this also rid of the occasional ircd.pid.bak that I tend to find?

ohnobinki

2011-01-01 02:53

reporter   ~0016563

katsklaw: no, that file gets generated by the ./unreal script during a successful ./unreal restart .

warg

2011-01-01 10:24

reporter   ~0016566

Yes it should actually. since there's no ircd.pid to backup on a clean shutdown, there shouldn't be ircd.pid.bak.

syzop

2016-01-11 18:22

administrator   ~0019041

https://github.com/unrealircd/unrealircd/commit/bf06e0825c48fc992b60569b4ad48650b4c589b7

Issue History

Date Modified Username Field Change
2010-12-31 09:10 warg New Issue
2010-12-31 09:10 warg File Added: del_pidfile_on_shutdown.patch
2010-12-31 15:02 ohnobinki File Added: unreal-3994-del-pidfile.patch
2010-12-31 15:03 ohnobinki Note Added: 0016554
2010-12-31 18:28 warg Note Added: 0016557
2011-01-01 02:30 katsklaw Note Added: 0016561
2011-01-01 02:53 ohnobinki Note Added: 0016563
2011-01-01 10:24 warg Note Added: 0016566
2016-01-11 18:22 syzop Note Added: 0019041
2016-01-11 18:22 syzop Status new => resolved
2016-01-11 18:22 syzop Fixed in Version => 4.0.1
2016-01-11 18:22 syzop Resolution open => fixed
2016-01-11 18:22 syzop Assigned To => syzop