/[baselayout]/trunk/src/librc-misc.c
Gentoo

Diff of /trunk/src/librc-misc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2649 Revision 2650
642 fclose (fp); 642 fclose (fp);
643 } 643 }
644 } else 644 } else
645 env = rc_strlist_add (env, "RC_DEFAULTLEVEL=" RC_LEVEL_DEFAULT); 645 env = rc_strlist_add (env, "RC_DEFAULTLEVEL=" RC_LEVEL_DEFAULT);
646 646
647 /* Store the name of the tty that stdout is connected to
648 * We do this so our init scripts can call eflush without any knowledge
649 * of our fd's */
650 if (isatty (fileno (stdout))) {
651 if ((p = rc_xstrdup (ttyname (fileno (stdout))))) {
652 i = strlen ("RC_TTY=") + strlen (p) + 1;
653 line = rc_xmalloc (sizeof (char *) * i);
654 snprintf (line, i, "RC_TTY=%s", p);
655 env = rc_strlist_add (env, line);
656 free (p);
657 free (line);
658 }
659 }
660
647 memset (sys, 0, sizeof (sys)); 661 memset (sys, 0, sizeof (sys));
648 662
649 /* Linux can run some funky stuff like Xen, VServer, UML, etc 663 /* Linux can run some funky stuff like Xen, VServer, UML, etc
650 We store this special system in RC_SYS so our scripts run fast */ 664 We store this special system in RC_SYS so our scripts run fast */
651#ifdef __linux__ 665#ifdef __linux__

Legend:
Removed from v.2649  
changed lines
  Added in v.2650

  ViewVC Help
Powered by ViewVC 1.1.20