From c8e78674ed3fb19bab55cfbdac5db8a320e8e721 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 1 Aug 2020 09:00:18 +0200 Subject: slave: emit user-notifications before dup:ing stdin/stdout/stderr Since we need to restore the status flags anyway, there's nothing to gain from emitting the user notifications after dup:ing the pts file descriptor. On the other hand, emitting user notifications *before* dup:ing means we can still print error messages for e.g. write(3) errors. --- user-notification.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'user-notification.h') diff --git a/user-notification.h b/user-notification.h index dada7fbe..1777d521 100644 --- a/user-notification.h +++ b/user-notification.h @@ -2,12 +2,14 @@ #include +enum user_notification_kind { + USER_NOTIFICATION_DEPRECATED, + USER_NOTIFICATION_WARNING, + USER_NOTIFICATION_ERROR, +}; + struct user_notification { - enum { - USER_NOTIFICATION_DEPRECATED, - USER_NOTIFICATION_WARNING, - USER_NOTIFICATION_ERROR, - } kind; + enum user_notification_kind kind; char *text; }; -- cgit v1.3