search for: setup_signals

Displaying 11 results from an estimated 11 matches for "setup_signals".

Did you mean: set_up_signals
2005 Oct 23
0
FC4 + nut => shutdown sequence conundrum
...for drivers/main.c I observe that the chdir is happening in main() on line 551. The call to shutdown the UPS happens a few lines later, on line 568. The interesting lines are: if (chdir(dflt_statepath())) fatal("Can't chdir to %s", dflt_statepath()); setup_signals(); /* clear out callback handler data */ memset(&upsh, '\0', sizeof(upsh)); upsdrv_initups(); /* now see if things are very wrong out there */ if (broken_driver) { printf("Fatal error: broken driver. It probably needs to be...
2007 Mar 13
18
Daemonizing a camping server
...settings = {:host => "0.0.0.0", :log_file => ''foo.log'', :cwd => $MYSERVER_HOME} config = Mongrel::Configurator.new settings do listener :port => 12345 do uri ''/foo'', :handler => Mongrel::Camping::CampingHandler.new(CASServer) setup_signals end daemonize :log_file => ''foo.log'', :cwd => $MYSERVER_HOME end config.run config.join The server works just fine if I comment out the "daemonize" call, but doesn''t work at all when daemonized. Any ideas? This e-mail message is privileged, confi...
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...signals are passed on to every known UPS RP */ + upstype_t *u; + + for (u = firstups; u; u = u->next) { + if ( u->sigusr2 < MAX_SIGUSR2 ) { + (u->sigusr2)++; + upsdebugx(1, "%s: UPS %s, sigusr2 up to %d", __func__, u->name, u->sigusr2); + } + } +} + static void setup_signals(void) { struct sigaction sa; @@ -869,6 +895,12 @@ static void setup_signals(void) /* handle reloading */ sa.sa_handler = set_reload_flag; sigaction(SIGHUP, &sa, NULL); + + /* Handle user signals. RP */ + sa.sa_handler = sigusr1_handler; + sigaction(SIGUSR1, &sa, NULL); + sa.sa...
2008 Feb 10
1
MSG_NOSIGNAL does not exist in OS X
Arnaud, I'm seeing an error with the XML/HTTP driver in NUT: (from http://buildbot.ghz.cc/public/nut/MacOSX-10.4-G4/builds/3/step- compile/0 ) if gcc -DHAVE_CONFIG_H -I. -I../../drivers -I../include -I../../ include -I/sw/include -g -Os -pipe -pipe -Ddarwin8 -I/System/Library/ Frameworks/System.framework/PrivateHeaders -I. -I/usr/include - DMGEXML_MODE -DMGE_MODE -O -Wall
2009 Apr 20
0
upslog patch
...409,10 @@ case 'V': exit(EXIT_SUCCESS); + + case 'p': + pidfilebase = optarg; + break; } } @@ -476,7 +482,7 @@ setup_signals(); - writepid("upslog"); + writepid(pidfilebase); become_user(new_uid); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: This is a digitally signed message part. U...
2011 Sep 15
0
Patch to NUT 2.6.0 two fix two issues
...cessary > false alarms... Solved with a set_alarm()/clear_alarm() wrapper around the > upscl_connect() call. > thanks for your patch. I've got to check it more thoroughly, but it will at least need some rework. as an example, the "signal(SIGCHLD, SIG_IGN)" should be in "setup_signals(void)" and use "sigaction" for more portability. a side question: is there any reason you also commented "signal(SIGALRM, SIG_IGN)" in "clear_alarm()"? I'm running out of time to integrate it in 2.6.1, but will consider for the next. thanks for your contribu...
2006 Dec 23
2
exception logging
Hi all- I''m running mongrel with a tiny HttpHandler that hooks into a larger library I''m working on. I''ve run into a snag with trying to debug with it in that I''m not entirely sure how to get the exception logs of errors that are raised. All I get to stderr is this: Fri Dec 22 17:16:14 -0800 2006: ERROR: Couldn''t find Models::Contact without
2014 Dec 09
3
Tiny suggestion for upslog.c
...ents/upslog.c 2014-12-08 23:24:02.906586228 +0000 @@ -76,6 +76,11 @@ exit_flag = sig; } +static void set_print_now_flag(int sig) +{ + /* no need to do anything, the signal will cause sleep to be interrupted */ +} + /* handlers: reload on HUP, exit on INT/QUIT/TERM */ static void setup_signals(void) { @@ -96,6 +101,11 @@ fatal_with_errno(EXIT_FAILURE, "Can't install SIGQUIT handler"); if (sigaction(SIGTERM, &sa, NULL) < 0) fatal_with_errno(EXIT_FAILURE, "Can't install SIGTERM handler"); + + sa.sa_handler = set_print_now_fl...
2009 May 05
3
[nut-commits] svn commit r1837 - trunk/clients
...9;: > exit(EXIT_SUCCESS); > + > + case 'p': > + pidfilebase = optarg; > + break; > } > } > > @@ -477,7 +483,7 @@ > > setup_signals(); > > - writepid("upslog"); > + writepid(pidfilebase); > > become_user(new_uid); > > > _______________________________________________ > nut-commits mailing list > nut-commits at lists.alioth.debian.org > http://lists.alioth.debian.org/...
2010 Oct 25
7
[PATCH 0/6] Ocfs2-tools: Add a new tool 'o2info'.
Now it's a good time to introduce the new tool 'o2info' since kernel part of OCFS2_IOC_INFO ioctl has been pulld upstream by linus. The following 6 patches have already got sunil's SOBs, and now they're trying to attract more reviewers before it goes to central repo with a modification of getting manual pages being introduced.
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -