Commit Graph

68 Commits

Author SHA1 Message Date
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
Thomas Klausner
97df66c0a0 Put Nd argument after Nd macro.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:27 -07:00
Thomas Klausner
db8e287e41 Use "Fl Fl" for long options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:14 -07:00
Love Hornquist Astrand
b1909b2daa Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell 2011-05-04 21:31:10 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
987faedb80 add random abstraction 2010-11-29 09:31:07 -08:00
Asanka Herath
5dcc605f6b Fix calling conventions for Windows 2010-08-20 13:14:10 -04:00
Asanka Herath
0d09c879f3 Reduce compiler warnings on Windows 2010-08-20 13:04:06 -04: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
f4b101544a buildfix on irix, from metze
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24967 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-27 15:01:23 +00:00
Love Hörnquist Åstrand
41a7bd3b69 Don't return void.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24621 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-04 22:11:21 +00: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
9d9b7c7ed7 if i18n function, default to builtin (no i18n).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23821 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:44:33 +00:00
Love Hörnquist Åstrand
e3ccedbfa9 provide arg_printusage_i18n
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23817 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:43:44 +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
2e4f85e4fb don't need to store the last col =
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23660 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-25 02:30:17 +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
Love Hörnquist Åstrand
6806ed574f (add_string): catch error from realloc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13381 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-17 12:07:42 +00:00
Johan Danielsson
86ae7dc7d0 don't put Ns before comma
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11173 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-20 16:23:07 +00:00
Johan Danielsson
f676ed55e4 rename optind and optarg to avoid some gcc warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10906 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 08:50:08 +00:00
Assar Westerlund
063d6c1041 add missing parenthesis
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10680 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-10 13:22:43 +00:00
Assar Westerlund
20be9e286b use more randomness (arc4random + srandomdev)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10676 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-09 20:27:25 +00:00
Assar Westerlund
68afa70fbc (arg_match_long): fix parsing of arg_counter optional argument
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10381 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-23 04:30:11 +00:00
Johan Danielsson
fbf3aa3ff5 Grog tries to figure out if to use mdoc.old instead of mdoc by looking
at some macros that were only present in the old version, and by
looking at the number of .Oo's present. In mdoc.old .Oo was a toggle,
but in mdoc it's closed by .Oc, so if the number of .Oo's is bigger
than the number of .Oc's, it figures it must be mdoc.old. This doesn't
however account for called Oc's, and thus grog thinks that valid pages
are mdoc.old when they infact are mdoc. So let's make sure that Oc's
are not called by other macros.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10031 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-08 21:39:56 +00:00
Assar Westerlund
c4d8393ea2 (free_getarg_strings): add function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9816 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-04-25 12:06:10 +00:00
Johan Danielsson
5381d88f33 pack short flag options togther, to shorten the usage string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9799 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-04-21 16:04:50 +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
Assar Westerlund
946da5d4b2 (print_arg): add a case for arg_strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9412 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-25 17:03:15 +00:00
Assar Westerlund
081ad8ccd6 add stdlib.h and string.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8565 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-06 22:15:04 +00:00
Assar Westerlund
41c126a7ce (arg_match_short): backup optind when there's a missing argument so
that the error can point at the flag and not the non-existant argument


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-03-09 07:49:35 +00:00
Assar Westerlund
1852dc267f (mandoc_template): also fix no- prefix in .Sh OPTIONS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7941 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-02-13 21:06:43 +00:00
Assar Westerlund
60e3154876 (mandoc_template): better man-stuff for negative options
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7938 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-02-13 20:50:13 +00:00
Johan Danielsson
3ca5f8150f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7463 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 16:58:55 +00:00
Assar Westerlund
6e2f0bddfe add a new type of argument: `arg_counter'
re-organize the code somewhat


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7351 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-12 15:34:51 +00:00
Johan Danielsson
a8827e2cb4 change the way arg_collect works; it's still quite horrible though
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7184 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-18 17:13:43 +00:00
Assar Westerlund
8f1b20431e (getarg): also set optind when returning error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7112 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-05 22:43:28 +00:00
Johan Danielsson
014b3527e7 add a callback type to do more complicated processing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7023 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-24 14:47:56 +00:00
Johan Danielsson
5486efe053 add floating point support
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7022 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-24 12:59:53 +00:00
Assar Westerlund
8e441f1158 strc{py,at}_truncate -> strlc{py,at}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6983 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-16 20:06:06 +00:00
Assar Westerlund
66b3034e8e more braces
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5226 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-11-22 09:45:42 +00:00
Assar Westerlund
3719f25eed (arg_printusage): new parameter `progname'. NULL means __progname.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5125 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-08-18 20:25:47 +00:00
Johan Danielsson
a5f54865d4 merge strcpy_truncate branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-06-09 19:25:40 +00:00
Johan Danielsson
590817e798 (mandoc_template): Put short and long options in SYNOPSIS within the
same [ ] pair.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4997 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-31 01:24:01 +00:00
Johan Danielsson
052559a46f (arg_printusage): try to keep options shorter than column width
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4990 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-29 22:14:08 +00:00
Johan Danielsson
ea1a268a98 (mandoc_template): Put short and long options in DESCRIPTION on the
same line.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4976 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-28 23:19:12 +00:00
Johan Danielsson
c62e897e69 (arg_match_long): make sure you only get an exact match if the strings
are the same length


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4972 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-28 22:04:57 +00:00