由买买提看人间百态

topics

全部话题 - 话题: sigusr1
(共0页)
c*****a
发帖数: 808
1
来自主题: Programming版 - 两个process重复了,哪里错了
flag在main的外面.之前我用fgets加File pointer *就不会重复,感觉是因为跟
pointer有关,现在用lower level的read加 lseek(fd, atIndex, SEEK_SET)来做,感
觉fd 在parent和child不会因为另外一边改变而改变
有人指教吗
int flag =1;
int main(){
pid=fork();
if(pid<0)
error
else
if ( pid == 0 ) {
/* child*/
do{
if(flag ==0)
read and write n bytes ,atIndex +n

if XXX break;
kill(getppid (), SIGUSR1) ;
signal(SIGUSR1, shandler);
pause();
}while(1);
exit(3);
} else {
/* parent... 阅读全帖
E***e
发帖数: 3430
2
来自主题: Hardware版 - OpenVPN还是绕不过IT,求破
用了8080 TCP TAP
别的地方测试没问题
到了公司还是不行
求解
Fri Jun 19 09:25:53 2015 Warning: cannot open --log file: C:Program
FilesOpenVPNlogHome1.log: ????? (errno=5)
Fri Jun 19 09:25:53 2015 OpenVPN 2.3.7 x86_64-w64-mingw32 [SSL (OpenSSL)] [
LZO] [PKCS11] [IPv6] built on Jun 8 2015
Fri Jun 19 09:25:53 2015 library versions: OpenSSL 1.0.1m 19 Mar 2015, LZO 2
.08
Fri Jun 19 09:25:54 2015 Attempting to establish TCP connection with [AF_
INET]*.*.*.*:8080 [nonblock]
Fri Jun 19 09:25:55 2015 TCP connection establish... 阅读全帖
c*****a
发帖数: 808
3
2. 好像用这几个lib能搞定 dirent stat
signal能不能直接注册建一个sighanlder用来注册sigusr1
H******7
发帖数: 34403
4
来自主题: Living版 - 借人气问这VPN算连上了么?
Thu Mar 03 12:18:17 2011 Inactivity timeout (--ping-restart), restarting
Thu Mar 03 12:18:17 2011 TCP/UDP: Closing socket
Thu Mar 03 12:18:17 2011 SIGUSR1[soft,ping-restart] received, process
restarting
Thu Mar 03 12:18:17 2011 Restart pause, 2 second(s)
Thu Mar 03 12:18:19 2011 IMPORTANT: OpenVPN's default port number is now
1194, based on an official port number assignment by IANA. OpenVPN 2.0-
beta16 and earlier used 5000 as the default port.
Thu Mar 03 12:18:19 2011 Re-using pre-shared stat... 阅读全帖
w*s
发帖数: 7227
5
# udhcpc --help
BusyBox v1.18.4 (2011-09-06 10:46:51 EDT) multi-call binary.
Hi, for some reason i cannot renew the lease.
root# udhcpc -i eth0 -s ./udhcpc.script -p eth0.pid -b
yes i got the ip address etc.
in udhcpc.script i put echos in the beginning so i know it get called
now since udhcpc is up running for eth0, i do this,
root# cat eth0.pid, i get 869
root# /bin/kill -SIGUSR1 869
nothing happened, no print from udhcpc.script
what did i do wrong pls ?
do i have files missing ?
c********l
发帖数: 77
6
来自主题: Computation版 - 请帮我看看这个MPI_Scatter() 问题
有一个C写的MPI程序,目前用gdb在16个节点上调试:
很快锁定下面这句有问题,每次运行到这里就出错:
MPI_Scatter(SendValueReal, (X_Size*Y_Size)/(XN*YN), MPI_FLOAT,
Local_Buf, (X_Size*Y_Size)/(XN*YN), MPI_FLOAT, 0, MPI_COMM_WORLD);
错误信息如下:
p1_29194: p4_error: interrupt SIGSEGV: 11
p5_11579: p4_error: interrupt SIGSEGV: 11
p7_513: p4_error: interrupt SIGSEGV: 11
p11_31130: p4_error: interrupt SIGSEGV: 11
Program received signal SIGUSR1, User defined signal 1.
p9_31572: p4_error: interrupt SIGSEGV: 11
p13_29641: p4_error: interrupt SIGSEGV
(共0页)