const char * SHELL = "/usr/bin/ktrace /bin/zsh"; #include #include #include #include int main(void) { printf("Now Running shell %s...\n", SHELL); syslog(LOG_ERR|LOG_USER, "Running shell %s...", SHELL); /* execl should replace this process with a new zsh process */ execl("/usr/bin/ktrace", "/usr/bin/ktrace", "/bin/zsh"); printf("We're still here... errno %d\n", errno); syslog(LOG_ERR|LOG_USER, "Still here."); return 0; }