AC_DEFINE_UNQUOTED(DEFCONFIG, "$configfile", [Path to the default config file.])
-AC_CHECK_FUNCS([openpty setenv])
+AC_CHECK_FUNCS([openpty setenv setproctitle])
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
{
loggedin = 1;
snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username);
+#ifdef HAVE_SETPROCTITLE
+ setproctitle ("%s", me->username);
+#endif
}
}
}
{
loggedin = 1;
snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username);
+#ifdef HAVE_SETPROCTITLE
+ setproctitle ("%s", me->username);
+#endif
}
else
{
loggedin = 1;
snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username);
+#ifdef HAVE_SETPROCTITLE
+ setproctitle ("%s", me->username);
+#endif
if (access (rcfilename, R_OK) == -1)
write_canned_rcfile (rcfilename);
size_t len = strlen(argv[optind]);
memset(argv[optind++], 0, len);
}
+#ifdef HAVE_SETPROCTITLE
+ setproctitle ("(not logged in)");
+#endif
create_config();
while (!purge_stale_locks())
menuloop();
+#ifdef HAVE_SETPROCTITLE
+ setproctitle ("%s [playing]", me->username);
+#endif
+
endwin ();
signal(SIGWINCH, SIG_DFL);