| 1 | Fix |
| 2 | error: call to '__umask_invalid_mode' declared with |
| 3 | attribute error: umask called with invalid mode |
| 4 | on android-21 |
| 5 | |
| 6 | diff -u -r ../coreutils-8.23/src/nohup.c ./src/nohup.c |
| 7 | --- ../coreutils-8.23/src/nohup.c 2014-07-11 07:00:07.000000000 -0400 |
| 8 | +++ ./src/nohup.c 2014-12-14 15:22:47.939242789 -0500 |
| 9 | @@ -141,7 +141,7 @@ |
| 10 | char const *file = "nohup.out"; |
| 11 | int flags = O_CREAT | O_WRONLY | O_APPEND; |
| 12 | mode_t mode = S_IRUSR | S_IWUSR; |
| 13 | - mode_t umask_value = umask (~mode); |
| 14 | + mode_t umask_value = umask (0777 & ~mode); |
| 15 | out_fd = (redirecting_stdout |
| 16 | ? fd_reopen (STDOUT_FILENO, file, flags, mode) |
| 17 | : open (file, flags, mode)); |