Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#16572 - [dtach] patch submission to enhance the -n working mode by enabling dtach to stay into foreground

Attached to Project: Community Packages
Opened by Ciprian Dorin Craciun (ciprian.craciun) - Sunday, 11 October 2009, 13:24 GMT
Last edited by Dan Griffiths (Ghost1227) - Saturday, 07 November 2009, 17:25 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Chris Brannon (cmb)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The description of the patch is below (an extract from the email that I've sent to the author of dtach, asking the inclusion of he same patch in upstream.)

And as I consider the patch useful, and non intrusive, I would like it to be seen adopted in ArchLinux even before the next release of dtach. (If the author likes my patch.)

Any comments?

----
[...snip...]

But there is one feature missing, that enables the following
usecase: there are certain applications that have curses interface,
but that fall into the long-running, daemon-like, kind of
applications.
For example I use rtorrent as BitTorrent client, but it needs a
terminal to run, and I want to run it just like any other service.

So dtach comes to rescue. I can use the functionality of `dtach
-n`. But unfortunately I also use runsv (part of runit) for service
management (it just spawns a process and if it dies, restarts it
again). So `dtach -n` doesn't work with runit as it goes into
background. Therefore in need to make somehow dtach not fork.

As a consequence I've made a small patch that introduces the
`dtach -N` method that acts just like `dtach -n` but without forking
into background. (The patch is attached. It modifies the man-page,
master.c and main.c. It is not intrusive.)

[...snip...]
This task depends upon

Closed by  Dan Griffiths (Ghost1227)
Saturday, 07 November 2009, 17:25 GMT
Reason for closing:  Won't implement
Additional comments about closing:  There is not a package in AUR with the -N option implemented.
Comment by Chris Brannon (cmb) - Tuesday, 13 October 2009, 02:39 GMT
I would be happy to add this patch to the dtach package,
especially if it is accepted upstream.
When you hear from the author of dtach, please let me know.

-- Chris
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Saturday, 07 November 2009, 07:35 GMT
No response (either positive or negative) from the dtach developer...

But if it helps, I've been using the patch with no problems...
Comment by Chris Brannon (cmb) - Saturday, 07 November 2009, 15:07 GMT
I suspect that dtach is abandon-ware. There is plenty of it on
sourceforge.net. Plus, it is a stable little tool that does its job well.
You opened this bug on October 11,
so why not wait another week or so, to give upstream a whole month to answer?

One problem I have with your patch is that dtach always exits with an
exit status of 1 when invoked as dtach -N.
This is due to one of the exit() calls in master_process, from master.c,
either the one at line 438, or the one at line 490. Right now, I don't
know which one.
I'll do a little more investigating.

Anyway, your patch is unintrusive, as you said. I'm open to adding it,
even though I'm not a big fan of patched source.

Regards,
-- Chris
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Saturday, 07 November 2009, 15:46 GMT
It's a pity for dtach to become abandon-ware... It's a very neat and light-weight tool... So, as you've proposed I'll wait a week or two and send another email to the developer.

About the exit code being 1 you're right. I'll look into the code and fix it.

Also I agree with you about patched sources. Maybe we could create another package named dtach-patched, and you appoint someone to look over that source base. (I use Gitorious, and I've setup a repository there when I've patched the source.) This way the ArchLinux build is patch-less.

Loading...