You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Nickolay Martinov (JIRA)" <ji...@apache.org> on 2011/02/03 11:32:29 UTC

[jira] Created: (EXEC-53) Allow control over asynchronous execution thread

Allow control over asynchronous execution thread
------------------------------------------------

                 Key: EXEC-53
                 URL: https://issues.apache.org/jira/browse/EXEC-53
             Project: Commons Exec
          Issue Type: Improvement
    Affects Versions: 1.1
            Reporter: Nickolay Martinov
         Attachments: commons-exec-daemon.patch

When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (EXEC-53) Allow control over asynchronous execution thread

Posted by "Nickolay Martinov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/EXEC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nickolay Martinov updated EXEC-53:
----------------------------------

    Attachment: EXEC-53.unit-test.patch

Attached patch with unit test.

> Allow control over asynchronous execution thread
> ------------------------------------------------
>
>                 Key: EXEC-53
>                 URL: https://issues.apache.org/jira/browse/EXEC-53
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Nickolay Martinov
>            Assignee: Siegfried Goeschl
>              Labels: patch
>         Attachments: EXEC-53.unit-test.patch, commons-exec-daemon.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
> Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (EXEC-53) Allow control over asynchronous execution thread

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/EXEC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990224#comment-12990224 ] 

Gary Gregory commented on EXEC-53:
----------------------------------

How about a unit test? :)

> Allow control over asynchronous execution thread
> ------------------------------------------------
>
>                 Key: EXEC-53
>                 URL: https://issues.apache.org/jira/browse/EXEC-53
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Nickolay Martinov
>              Labels: patch
>         Attachments: commons-exec-daemon.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
> Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (EXEC-53) Allow control over asynchronous execution thread

Posted by "Nickolay Martinov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/EXEC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nickolay Martinov updated EXEC-53:
----------------------------------

    Attachment:     (was: commons-exec-daemon.patch)

> Allow control over asynchronous execution thread
> ------------------------------------------------
>
>                 Key: EXEC-53
>                 URL: https://issues.apache.org/jira/browse/EXEC-53
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Nickolay Martinov
>              Labels: patch
>         Attachments: commons-exec-daemon.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
> Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (EXEC-53) Allow control over asynchronous execution thread

Posted by "Siegfried Goeschl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/EXEC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992727#comment-12992727 ] 

Siegfried Goeschl commented on EXEC-53:
---------------------------------------

Good idea - unit test would be still appreciated ... :-)

> Allow control over asynchronous execution thread
> ------------------------------------------------
>
>                 Key: EXEC-53
>                 URL: https://issues.apache.org/jira/browse/EXEC-53
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Nickolay Martinov
>            Assignee: Siegfried Goeschl
>              Labels: patch
>         Attachments: commons-exec-daemon.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
> Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (EXEC-53) Allow control over asynchronous execution thread

Posted by "Nickolay Martinov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/EXEC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nickolay Martinov updated EXEC-53:
----------------------------------

    Attachment: commons-exec-daemon.patch

Added patch that gives child class control over execution thread creation:

    @Override
    protected Thread createThread(Runnable task) {
        Thread thread = super.createThread(task);
        thread.setDaemon(true);
        return thread;
    }


> Allow control over asynchronous execution thread
> ------------------------------------------------
>
>                 Key: EXEC-53
>                 URL: https://issues.apache.org/jira/browse/EXEC-53
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Nickolay Martinov
>              Labels: patch
>         Attachments: commons-exec-daemon.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When process is started asynchronously using DefaultExecutor then thread is created that monitors process. This thread is user thread and blocks java program from exiting. There is no way to make this thread daemon. Allowing this to be a daemon thread one would be able to spawn process without &, monitor this process for some time to be sure that it is alive and then exit without calling System.exit() that isnt always possible/desirable.
> Also it would be nice to be able to create thread with specific priority or thread group or thread name or anything else.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira