io.backend.unix: init-signal-pipe function
Currently just reads off signal numbers and drops them.db4
							parent
							
								
									f9aa0419c4
								
							
						
					
					
						commit
						ed24890dce
					
				| 
						 | 
				
			
			@ -187,6 +187,13 @@ M: stdin cancel-operation
 | 
			
		|||
        size-read-fd <fd> init-fd <input-port> >>size
 | 
			
		||||
        data-read-fd <fd> >>data ;
 | 
			
		||||
 | 
			
		||||
: signal-pipe-fd ( -- n )
 | 
			
		||||
    OBJ-SIGNAL-PIPE special-object { fixnum } declare ; inline
 | 
			
		||||
 | 
			
		||||
: init-signal-pipe ( -- )
 | 
			
		||||
    signal-pipe-fd <fd> init-fd <input-port>
 | 
			
		||||
    '[ [ 4 _ io:stream-read ] loop ] "Signals" spawn drop ;
 | 
			
		||||
 | 
			
		||||
M: unix init-stdio
 | 
			
		||||
    <stdin> <input-port>
 | 
			
		||||
    1 <fd> <output-port>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -342,6 +342,8 @@ CONSTANT: OBJ-VM-COMPILER 72
 | 
			
		|||
 | 
			
		||||
CONSTANT: OBJ-WAITING-CALLBACKS 73
 | 
			
		||||
 | 
			
		||||
CONSTANT: OBJ-SIGNAL-PIPE 74
 | 
			
		||||
 | 
			
		||||
! Context object count and identifiers must be kept in sync with:
 | 
			
		||||
!   vm/contexts.hpp
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue