busybox: restore previous inittab handling when terminal can't be accessed (closes...
[openwrt-10.03/.git] / package / busybox / patches / 001-init_avoid_loop_opening_tty.patch
index 8cc9ca2c89b16e87333421858b852f34e6907c78..8f0ef1fc0a93195ada19634fe290b23b0b036325 100644 (file)
@@ -6,7 +6,7 @@
                         */
 -                      if (a->pid == 0)
 +                      if (a->pid == 0) {
-+                              if (a->terminal && access(a->terminal, R_OK | W_OK))
++                              if (a->terminal[0] && access(a->terminal, R_OK | W_OK))
 +                                      continue;
                                a->pid = run(a);
 +                      }