source: neercs/trunk/src/mytrace.h @ 2516

Last change on this file since 2516 was 2516, checked in by Sam Hocevar, 15 years ago
  • Fork the grabbed process and exit the parent. Unfortunately for some reason it still survives as a zombie, there must be something wrong with the setsid/setpgid mechanism we use (maybe setpgrp is needed?).
File size: 1.1 KB
2 *  neercs        console-based window manager
3 *  Copyright (c) 2008 Sam Hocevar <>
4 *                All Rights Reserved
5 *
6 *  $Id$
7 *
8 *  This program is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 * for more details.
13 */
15struct mytrace;
17struct mytrace* mytrace_attach(long int pid);
18struct mytrace* mytrace_fork(struct mytrace *t);
19int mytrace_detach(struct mytrace *t);
20long mytrace_getpid(struct mytrace *t);
22int mytrace_open(struct mytrace *t, char const *path, int mode);
23int mytrace_write(struct mytrace *t, int fd, char const *data, size_t len);
24int mytrace_close(struct mytrace *t, int fd);
25int mytrace_dup2(struct mytrace *t, int oldfd, int newfd);
26int mytrace_setpgid(struct mytrace *t, long pid, long pgid);
27int mytrace_setsid(struct mytrace *t);
28int mytrace_kill(struct mytrace *t, long pid, int sig);
29int mytrace_exit(struct mytrace *t, int status);
Note: See TracBrowser for help on using the repository browser.