|
|
发表于 2006-4-5 07:55:58
|
显示全部楼层
楼上的你确信“或者将setitimer的第一个参数改成ITIMER_PROF”吗? 我昨天试过:将 signal(SIGPROF,sig_handler); 换成 signal(SIGALRM,sig_handler); 是可以的;但是将 setitimer(ITIMER_REAL,&itv,NULL); 换成 setitimer(ITIMER_PROF,&itv,NULL); 却死活不行。 我的实验环境是
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
GNU C Library stable release version 2.3.3, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3).
Compiled on a Linux 2.4.20 system on 2004-10-27.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
The C stubs add-on version 2.1.2.
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Glibc-2.0 compatibility add-on by Cristian Gafton
GNU Libidn by Simon Josefsson
libthread_db work sponsored by Alpha Processor Inc
Thread-local storage support included.
请问楼上的是什么样的环境? |
|