- 论坛徽章:
- 3
|
- #include <unistd.h>
- #include <stdio.h>
- int main()
- {
- char* s[3];
- char* s2[1];
- s[0]="TEST";
- s[1]="1000";
- s[2]=NULL;
- s2[0]=NULL;
- execve("/bin/sleep",s,s2);
- }
复制代码
[root@SRUCAU tmp]# gcc 1.c
[root@SRUCAU tmp]# ./a.out &
[2] 23632
[root@SRUCAU tmp]# ps -ef| tail
root 955 1 0 12:13 tty3 00:00:00 /sbin/mingetty tty3
root 956 1 0 12:13 tty4 00:00:00 /sbin/mingetty tty4
root 957 1 0 12:13 tty5 00:00:00 /sbin/mingetty tty5
root 958 1 0 12:13 tty6 00:00:00 /sbin/mingetty tty6
root 1513 736 0 14:05 ? 00:00:01 /usr/sbin/sshd
root 2822 1513 0 14:06 pts/0 00:00:06 -bash
root 19502 2822 97 14:16 pts/0 01:54:22 -bash
postfix 22720 872 0 15:33 ? 00:00:00 pickup -l -t fifo -u -c
root 23632 2822 0 16:13 pts/0 00:00:00 TEST 1000
root 23635 2822 0 16:13 pts/0 00:00:00 ps -ef |
评分
-
查看全部评分
|