根据sem_timedwait
implementation,将NULL
代替abstime pointer
传递给sem_timedwait (sem_t * sem, const struct timespec *abstime)
abstime
应该阻止(永远)直到信号中断:
如果
NULL
是NULL
指针,那么此函数将会 阻止它可以成功降低值或 直到被信号打断。
然而,当我通过SIGSEGV
时,我立即收到以下错误而不等待:
编程收到信号
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>2016-10-24T14:35:54.851Z</u:Created> <u:Expires>2016-10-24T14:40:54.851Z</u:Expires> </u:Timestamp> <o:BinarySecurityToken u:Id="uuid-e5fff67c-e3ce-4c63-86da-9661adfd6e0c-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">...MIIFgTCCBGmgAwIBAgIKOePZb(shortened)...</o:BinarySecurityToken> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="#_0"> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>tsLKDNU0lJ5SB1p75WGVjd7LMHc=</DigestValue> </Reference> <Reference URI="#_1"> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>4QwJS9rCbZb1B3DcR37qnuJgSl4=</DigestValue> </Reference> </SignedInfo> <SignatureValue>...gmAXzaf8hhj44/M0Q(shortened)...</SignatureValue> <KeyInfo> <o:SecurityTokenReference> <o:Reference URI="#uuid-e5fff67c-e3ce-4c63-86da-9661adfd6e0c-2"/> </o:SecurityTokenReference> </KeyInfo> </Signature> </o:Security>
,分段错误。
为什么?