MCPcopy Create free account
hub / github.com/coreutils/coreutils / main

Function main

src/who.c:697–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697int
698main (int argc, char **argv)
699{
700 int optc;
701 bool assumptions = true;
702
703 initialize_main (&argc, &argv);
704 set_program_name (argv[0]);
705 setlocale (LC_ALL, "");
706 bindtextdomain (PACKAGE, LOCALEDIR);
707 textdomain (PACKAGE);
708
709 atexit (close_stdout);
710
711 while ((optc = getopt_long (argc, argv, "abdlmpqrstuwHT", longopts, NULL))
712 != -1)
713 {
714 switch (optc)
715 {
716 case 'a':
717 need_boottime = true;
718 need_deadprocs = true;
719 need_login = true;
720 need_initspawn = true;
721 need_runlevel = true;
722 need_clockchange = true;
723 need_users = true;
724 include_mesg = true;
725 include_idle = true;
726 include_exit = true;
727 assumptions = false;
728 break;
729
730 case 'b':
731 need_boottime = true;
732 assumptions = false;
733 break;
734
735 case 'd':
736 need_deadprocs = true;
737 include_idle = true;
738 include_exit = true;
739 assumptions = false;
740 break;
741
742 case 'H':
743 include_heading = true;
744 break;
745
746 case 'l':
747 need_login = true;
748 include_idle = true;
749 assumptions = false;
750 break;
751
752 case 'm':
753 my_line_only = true;
754 break;

Callers

nothing calls this directly

Calls 2

whoFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected