summaryrefslogtreecommitdiffstats
path: root/libc/include/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/unistd.h')
-rw-r--r--libc/include/unistd.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 1ada37e..b4f1dda 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -99,6 +99,10 @@ extern int setfsuid(uid_t);
extern int issetugid(void);
extern char* getlogin(void);
extern int getlogin_r(char* name, size_t namesize);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+
/* Macros for access() */
@@ -145,7 +149,7 @@ extern int ftruncate(int, off_t);
extern int pause(void);
extern unsigned int alarm(unsigned int);
extern unsigned int sleep(unsigned int);
-extern void usleep(unsigned long);
+extern int usleep(unsigned long);
extern int gethostname(char *, size_t);
extern int sethostname(const char *, size_t);
@@ -163,6 +167,8 @@ extern char *optarg;
extern int optind, opterr, optopt;
extern int isatty(int);
+extern char* ttyname(int);
+extern int ttyname_r(int, char*, size_t);
extern int acct(const char* filepath);
@@ -185,6 +191,14 @@ extern int cacheflush(long start, long end, long flags);
extern pid_t tcgetpgrp(int fd);
extern int tcsetpgrp(int fd, pid_t _pid);
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
__END_DECLS
#endif /* _UNISTD_H_ */