Nicolas Williams
badbef825d
roken: Add trailing / to PID file DIR path
...
Otherwise if $HEIM_PIDFILE_DIR doesn't end in / then the pidfile gets
created in the parent.
2022-11-30 00:28:41 -06:00
Nicolas Williams
7dfad1ab0b
Use secure_getenv() instead of issuid()
2017-04-17 18:02:30 -04:00
Viktor Dukhovni
f1bc9f2ff9
Avoid pidfile() missing prototype warnings
2016-12-19 20:55:08 -05:00
Viktor Dukhovni
7dc4481ed2
Avoid interposing pidfile(), use rk_pidfile() instead
2016-12-19 19:10:49 -05:00
Nicolas Williams
d609264a00
Only rm pidfile if PID matches
2016-12-06 22:44:23 -06:00
Nicolas Williams
a6e8ff2ae5
pidfile(): write newline too
2016-12-06 22:44:23 -06:00
Nicolas Williams
12eb54d03f
rk_pidfile() should call pidfile() if HAVE_PIDFILE
...
This is necessary so we can use --detach in tests even on NetBSD and
OpenBSD.
2016-12-06 22:44:23 -06:00
Nicolas Williams
b48bed5f42
Daemons detach atomically to avoid having to wait
...
Tests that start daemons have to "wait" for them to start.
This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready. The parent exits only which the child is
ready. This means that tests will no longer need to wait for daemons.
However, tests will still need a pidfile or such so they can stop the
daemons.
Note that the --detach options should not be used on OS X from launchd,
only from tests.
2015-03-24 11:49:59 -05:00
Roland C. Dowdeswell
abdde6a608
Additional changes to make -Wshadow build on Ubuntu 10.04.
...
Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
2012-06-07 16:59:01 +01:00
Love Hornquist Astrand
9773655027
catch error from as.*printf
2010-05-30 12:41:06 -07:00
Asanka Herath
d00f9984a5
Make roken build on windows
...
Signed-off-by: Love Hornquist Astrand <lha@h5l.org >
2009-11-24 21:42:02 -08:00
Love Hörnquist Åstrand
0d31d3d686
drop rcsid
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:30:37 +00:00
Love Hörnquist Åstrand
6937d41a02
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898
switch to utf8 encoding of all files
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
5cd0815781
use "roken.h" consitantly
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21005 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:54:35 +00:00
Love Hörnquist Åstrand
9df9f6a9da
revert 21003
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21004 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:53:10 +00:00
Love Hörnquist Åstrand
12df8538af
use "roken.h" consitantly
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21003 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:42:05 +00:00
Love Hörnquist Åstrand
709aa58c74
define ROKEN_LIB_FUNCTION on all exported functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14773 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-12 11:29:18 +00:00
Assar Westerlund
ae9b50a499
handle atexit or on_exit
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10635 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-02 23:58:15 +00:00
Assar Westerlund
67422a6b02
s/[gs]et_progname/[gs]etprogname/
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9704 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-20 01:44:56 +00:00
Johan Danielsson
f6b13f4957
conditionalise pidfile
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8891 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-04 11:19:41 +00:00
Johan Danielsson
209e0af265
add pidfile function
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8889 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-04 09:48:26 +00:00
Assar Westerlund
da3f9a1f77
add roken.h
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8438 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-21 15:15:42 +00:00
Assar Westerlund
685ce58dd4
new file
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8419 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-21 02:06:01 +00:00