 M: linux-io init-io ( -- )
     <select-mx>
     [ mx set-global ]
-    [ [ init-inotify ] curry ignore-errors ] bi ;
+    [ init-inotify ] bi ;
 
 T{ linux-io } set-io-backend
 

    f inotify-task <input-task> ;

: init-inotify ( mx -- )
    <inotify>
    dup inotify set-global
    <inotify-task> swap register-io-task ;

M: inotify-task do-io-task ( task -- )
    io-task-port read-notifications f ;


: <inotify> ( -- port/f )
    H{ } clone
    inotify_init dup 0 < [ 2drop f ] [
        inotify <buffered-port>
        { set-inotify-watches set-delegate } inotify construct
    ] if ;

: inotify-fd inotify get-global handle>> ;

