chiark / gitweb /
core: don't do runaway fork()s if we hit a segfault from our segfault handler
[elogind.git] / src / core / execute.c
index 5767037acde73250f8437d0bf98e24143fc2cb3e..9148d06df4697ea0fba78cc608d7d4e8dc8ba304 100644 (file)
@@ -144,7 +144,7 @@ static int flags_fds(const int fds[], unsigned n_fds, bool nonblock) {
         return 0;
 }
 
-static const char *tty_path(const ExecContext *context) {
+_pure_ static const char *tty_path(const ExecContext *context) {
         assert(context);
 
         if (context->tty_path)
@@ -509,7 +509,7 @@ fail:
         return r;
 }
 
-static int write_confirm_message(const char *format, ...) {
+_printf_attr_(1, 2) static int write_confirm_message(const char *format, ...) {
         int fd;
         va_list ap;
 
@@ -1837,7 +1837,7 @@ static void strv_fprintf(FILE *f, char **l) {
 }
 
 void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
-        char ** e;
+        char **e;
         unsigned i;
 
         assert(c);