mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make examples folder somewhat more focused
This commit is contained in:
parent
5141d00992
commit
e26bdbec52
29 changed files with 133 additions and 1225 deletions
|
@ -32,9 +32,9 @@ int main(int argc, char *argv[]) {
|
|||
ssize_t rc;
|
||||
size_t got, wrote;
|
||||
unsigned char buf[512];
|
||||
struct sigaction saint = {.sa_handler = GotCtrlC};
|
||||
fprintf(stderr, "This echos stdio until Ctrl+C is pressed.\n");
|
||||
CHECK_NE(
|
||||
-1, sigaction(SIGINT, &(struct sigaction){.sa_handler = GotCtrlC}, NULL));
|
||||
CHECK_NE(-1, sigaction(SIGINT, &saint, NULL));
|
||||
for (;;) {
|
||||
rc = read(0, buf, BUFSIZ);
|
||||
if (rc != -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue