diff options
| author | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 | 
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 | 
| commit | 98a8ac8498974e499fc129878ab05b9a7bf8ba30 (patch) | |
| tree | 2914967687516632a93da9af59818f22d3120861 /src/mds-base.c | |
| parent | Update e-mail (diff) | |
| download | mds-master.tar.gz mds-master.tar.bz2 mds-master.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/mds-base.c')
| -rw-r--r-- | src/mds-base.c | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/src/mds-base.c b/src/mds-base.c index 682ecf0..0c7d7fd 100644 --- a/src/mds-base.c +++ b/src/mds-base.c @@ -1,6 +1,6 @@  /**   * mds — A micro-display server - * Copyright © 2014, 2015, 2016, 2017  Mattias Andrée (maandree@kth.se) + * Copyright © 2014, 2015, 2016, 2017  Mattias Andrée (m@maandree.se)   *    * This program is free software: you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by @@ -125,21 +125,21 @@ parse_cmdline(void)  	/* Parse command line arguments. */  	for (i = 1; i < argc; i++) {  		arg = argv[i]; -		if ((v = strequals(arg, "--initial-spawn")) || /* Initial spawn? */ -		    strequals(arg, "--respawn")) {             /* Respawning after crash? */ +		if ((v = streq(arg, "--initial-spawn")) || /* Initial spawn? */ +		    streq(arg, "--respawn")) {             /* Respawning after crash? */  			exit_if (is_respawn == v,  			         eprintf("conflicting arguments %s and %s cannot be combined.",  			                 "--initial-spawn", "--respawn"););  			is_respawn = !v; -		} else if (strequals(arg, "--re-exec")) { /* Re-exec state-marshal. */ +		} else if (streq(arg, "--re-exec")) { /* Re-exec state-marshal. */  			is_reexec = 1; -		} else if (startswith(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */ -			alarm(min(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */ -		} else if (strequals(arg, "--on-init-fork")) { /* Fork process when initialised. */ +		} else if (strstarts(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */ +			alarm(MIN(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */ +		} else if (streq(arg, "--on-init-fork")) { /* Fork process when initialised. */  			on_init_fork = 1; -		} else if (startswith(arg, "--on-init-sh=")) { /* Run a command when initialised. */ +		} else if (strstarts(arg, "--on-init-sh=")) { /* Run a command when initialised. */  			on_init_sh = arg + strlen("--on-init-sh="); -		} else if (strequals(arg, "--immortal")) { /* I return to serve. */ +		} else if (streq(arg, "--immortal")) { /* I return to serve. */  			is_immortal = 1;  		}  	} | 
