diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 07:00:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 07:00:18 +0000 |
| commit | c8e78674ed3fb19bab55cfbdac5db8a320e8e721 (patch) | |
| tree | 8538a46b114c7d5b19afc8e19b99b02482685cb1 /user-notification.h | |
| parent | slave: user-notifications: skip the O_NONBLOCK dance when there aren't any notifications (diff) | |
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.
Diffstat (limited to 'user-notification.h')
| -rw-r--r-- | user-notification.h | 12 |
1 files changed, 7 insertions, 5 deletions
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 <tllist.h> +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; }; |
