Bug 62349 - Replace with fgetty
Summary: Replace with fgetty
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mingetty
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: Brock Organ
URL: http://www.fefe.de/fgetty/
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-30 01:52 UTC by Enrico Scholz
Modified: 2007-04-18 16:41 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-03 21:49:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2002-03-30 01:52:27 UTC
When looking at the output of 'ps axu' the reasons for a change are
obviously:

| root     15469  0.0  0.0    20   20 vc/5     S    01:31   0:00 /local/sbin/fgetty vc/5
| root     15496  0.0  0.3  1440  440 vc/6     S    01:31   0:00 /sbin/mingetty vc/6
                            ~~~~~~~~~

fgetty (http://www.fefe.de/fgetty/) provides similar features (expansion
of \X sequences in /etc/issue) and works perfectly[1] with the other Red
Hat tools (e.g. /bin/login).

Therefore, you gain a significantly less memory-footprint at null
costs.



Footnotes: 
[1] In fact, I had to comment out '-DTEST' in the Makefile and the
    final 'echo_off();' in fgetty.c

Comment 1 Bill Nottingham 2002-04-01 20:51:50 UTC
Generally, we do not want to head down the path of diet-izing the entire
distribution.

Comment 2 Enrico Scholz 2002-04-01 21:09:21 UTC
Generally, this might be right.

But in the fgetty-case it is wrong... fgetty has the same behavior as mingetty,
because it IS mingetty (without stdio-stuff).

Do you see any drawbacks when using fgetty instead of mingetty?

Comment 3 Florian La Roche 2002-04-03 13:49:09 UTC
The memory savings come from then linking against diet0libc and not just from
removing stdio, right? It does not make sense to start linking against that.
If the memory footprint can be reduced by changing how error messages are
output, please reopen again and I'll consider this for future mingetty versions.

Thanks,

Florian La Roche


Comment 4 Enrico Scholz 2002-04-03 21:49:30 UTC
I do not understand why linking against dietlibc does not make
sense. Linking happens static so there are no runtime-dependencies
on dietlibc.



Not using stdio saves 16KB which are 80% of the memory needed by the
diet-libc compiled fgetty:

| root      1173  0.0  0.0    20   20 vc/5     S    22:53   0:00 /sbin/fgetty vc/5
| root      1663  0.4  0.0    36   36 vc/7     S    23:41   0:00 /sbin/mingetty.diet vc/7
| root      1666  2.0  0.3  1440  440 vc/8     S    23:41   0:00 /sbin/mingetty.glibc vc/8
| root      1667  7.0  0.1   444  160 vc/9     S    23:41   0:00 /sbin/mingetty.glibcs vc/9

| $ ls -l /sbin/fgetty /sbin/mingetty.*	## files are stripped
| -rwx------    1 root     root         5908 Mar 30 04:20 /sbin/fgetty
| -rwxr-xr-x    1 root     root        20172 Apr  3 23:36 /sbin/mingetty.diet
| -rwxr-xr-x    1 root     root         8136 Apr  3 23:40 /sbin/mingetty.glibc
| -rwxr-xr-x    1 root     root       435432 Apr  3 23:40 /sbin/mingetty.glibcs


/sbin/fgetty          is fgetty-0.5[1]      static  linked with dietlibc
/sbin/mingetty.diet   is mingetty-1.00-1[2] static  linked with dietlibc
/sbin/mingetty.glibc  is mingetty-1.00-1[2] dynamic linked with glibc
/sbin/mingetty.glibcs is mingetty-1.00-1[2] static  linked with glibc

Compilerflags were '-Os -D_GNU_SOURCE'.


Footnotes: 
[1]  plus '--long-hostname' patch; should be now in 0.6 also
[2]  without the nologin-patch and with s!sys_errlist!strerror!



Comment 5 Florian La Roche 2002-08-02 08:10:31 UTC
mingetty stays in Red Hat Linux.

Sorry,

Florian La Roche



Note You need to log in before you can comment on or make changes to this bug.