Mercurial > hg > Members > kono > nitros9-code
changeset 2579:2b4283c91c98
Added support for tmode (forking)
author | boisy |
---|---|
date | Mon, 08 Aug 2011 01:20:40 +0000 |
parents | 48e3cadb6222 |
children | 2e7092ed1e10 |
files | level1/cmds/inetd.a |
diffstat | 1 files changed, 33 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/cmds/inetd.a Sun Aug 07 09:21:33 2011 +0000 +++ b/level1/cmds/inetd.a Mon Aug 08 01:20:40 2011 +0000 @@ -43,10 +43,14 @@ netpath rmb 1 targetprog rmb 128 targetparams rmb 128 +tmodeparamlen rmb 1 +tmodeparams rmb 128 endsect NetSig equ 2 +tmode fcs /tmode/ + * signal intercept routine sigint cmpb #NetSig bne sigex @@ -297,7 +301,7 @@ * Fork Proccess that matches target port * Extract first parameter at X and see if it matches target port * if so, read rest of line and fork the process -* Line looks like this: portnumberplusoptions,prog,params +* Line looks like this: portnumberplusoptions,prog,params,path opts ForkProcForPort * get port number lbsr DEC_BIN @@ -342,12 +346,24 @@ sethi lda -1,y ora #$80 sta -1,y -copypar leay targetparams,u +copypar clr tmodeparamlen,u + leay targetparams,u parloop lda ,x+ sta ,y+ + cmpa #', + beq procopts cmpa #C$CR - bne parloop + beq gotprocparms +procopts + leay tmodeparams,u +procoptsloop lda ,x+ + sta ,y+ + inc targetparams,u + cmpa #C$CR + beq procoptsloop + +gotprocparms IFNE DEBUG pshs d lbsr PRINTS @@ -440,7 +456,21 @@ os9 I$Dup lbcs errex +* fork tmode process if tmode param length > 0 + tst tmodeparamlen,u + beq forkchild + pshs u + leax tmode,pcr + leau tmodeparams,u + lda #Objct + clrb + ldy #256 + os9 F$Fork + puls u + os9 F$Wait + * fork child process +forkchild pshs u leax targetprog,u leau targetparams,u