aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-09 17:06:20 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-09 17:06:20 -0800
commitc70e92e98d34e14b1e1310a10677b7c0f6e2b54c (patch)
treeb5f2d4e2bfd8ff9a3e9b5ca8a21b81f48302d7d9 /wutil.h
parentbf10d6c03b1751bf7ae702508df02e238a1429c7 (diff)
Don't call strerror or perror after fork, it's unsafe. Added safe_strerror and safe_perror replacements.
Diffstat (limited to 'wutil.h')
-rw-r--r--wutil.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/wutil.h b/wutil.h
index e780be0d..b0d7b331 100644
--- a/wutil.h
+++ b/wutil.h
@@ -83,6 +83,16 @@ int wunlink(const wcstring &pathname);
void wperror(const wcstring &s);
/**
+ Async-safe version of perror().
+*/
+void safe_perror(const char *message);
+
+/**
+ Async-safe version of strerror().
+*/
+const char *safe_strerror(int err);
+
+/**
Wide character version of getcwd().
*/
wchar_t *wgetcwd(wchar_t *buff, size_t sz);