Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150736 - app-misc/screen - init script to clean dead screens
Summary: app-misc/screen - init script to clean dead screens
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-10 04:55 UTC by INODE64 Sistemas
Modified: 2006-10-12 14:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
screen-4.0.2-r5.ebuild.diff (screen-4.0.2-r5.ebuild.diff,778 bytes, patch)
2006-10-10 04:56 UTC, INODE64 Sistemas
Details | Diff
screen-cleanup.rc (screen-cleanup.rc,196 bytes, text/plain)
2006-10-10 04:56 UTC, INODE64 Sistemas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description INODE64 Sistemas 2006-10-10 04:55:56 UTC
add a boot scritps to remove the deaths screen
Comment 1 INODE64 Sistemas 2006-10-10 04:56:34 UTC
Created attachment 99276 [details, diff]
screen-4.0.2-r5.ebuild.diff
Comment 2 INODE64 Sistemas 2006-10-10 04:56:51 UTC
Created attachment 99277 [details]
screen-cleanup.rc
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-10-10 10:27:54 UTC
Sounds like a big overkill for trivial screen -wipe command.
Comment 4 Neil Bothwick 2006-10-10 15:58:10 UTC
screen -wipe is insufficient as it only removes screens owned by the user running it, root in this case.

To remove screens belonging to all owners, you need

find /var/run/screen/ -type p | sed s:/var/run/screen/S-:: | xargs --no-run-if-empty screen -wipe

Running it from local.start should be enough, a separate script for a single command line seems OTT.
Comment 5 INODE64 Sistemas 2006-10-11 03:55:25 UTC
Sorry for my english! 

Yes the idea is remove all screens deads on start up
Comment 6 Sven Wegener gentoo-dev 2006-10-12 14:44:36 UTC
You can't use xargs with screen this way, as screen requires stdin to be a tty. And you need -n 1 as screen will only wipe the first argument. Using rm -f /var/run/screen/S-*/* is bad, as it will remove active sessions and local.start is too late, as some init scripts use screen too launch a daemon in background. I agree with Jakub that it's too much hassle for a single command.