Mercurial > projects > pwm
comparison cmd.h @ 19:5c6155c8e9b6
Handle signals
Handled signals are generally blocked and only unblocked when doing blocking
I/O, i.e. either when reading commands or printing results. A (possibly
queued) signal will then interrupt I/O and can be dealt with in the main loop.
author | Guido Berhoerster <guido+pwm@berhoerster.name> |
---|---|
date | Fri, 01 Sep 2017 22:33:41 +0200 |
parents | a07665727c19 |
children |
comparison
equal
deleted
inserted
replaced
18:1e39a251cbe9 | 19:5c6155c8e9b6 |
---|---|
29 enum cmd_return { | 29 enum cmd_return { |
30 CMD_OK, | 30 CMD_OK, |
31 CMD_STATUS, | 31 CMD_STATUS, |
32 CMD_ERR, | 32 CMD_ERR, |
33 CMD_USAGE, | 33 CMD_USAGE, |
34 CMD_SIGNAL, | |
34 CMD_QUIT | 35 CMD_QUIT |
35 }; | 36 }; |
36 | 37 |
37 struct cmd { | 38 struct cmd { |
38 const char *abbrev_cmd; | 39 const char *abbrev_cmd; |