...
| Code Block | ||
|---|---|---|
| ||
if(!fgets(filename, sizeof(filename), stdio)) {
/* handle error */
}
if(!open(filename, O_WRONLY, 0600)) {
/* handle error */
}
/* if filename is a new fifo or a locked device the program may now hang in the open call */
|
...