LIBS="-lxnet $LIBS"
AC_DEFINE(PREAD_BROKEN,, Defint if pread/pwrite implementation is broken)
;;
- linux*)
+ linux*|darwin*)
AC_DEFINE(PROCTITLE_HACK,, Define if process title can be changed by modifying argv)
;;
*)
{
size_t len = strlen(title);
- if (len >= process_title_len)
- len = process_title_len - 1;
+ /* OS X wants two NULs */
+ if (len >= process_title_len-1)
+ len = process_title_len - 2;
memcpy(process_title, title, len);
process_title[len++] = '\0';
+ process_title[len++] = '\0';
if (len < process_title_clean_pos) {
memset(process_title + len, PROCTITLE_CLEAR_CHAR,