telnet으로 실행한 프로세스가 끊긴 뒤에도 계속 실행되게 할 수 있나요?

mydream의 이미지

윈도우용으로 프로그램을 만들었습니다. telnet으로 프로세스를 실행했는데, telnet을 끊으면 프로그램이 종료됩니다. 실행시킨 프로그램이 ccc이고, ccc에서는 넘긴 숫자 인자에 따라 그 수만큼 루프를 돌며 CreateProcess로 프로세스를 만듭니다. CreateProcess 인자에 CREATE_NEW_CONSOLE를 넘기면 될까요? 이런 게 안되면 어떤 방법이 있나요?

msshinok의 이미지

게시판에 ssh나 screen을 쓰면, 끊어도 프로그램 종료안되는 옵션이 있다고 나오니 한번 검색해보세요.

The die is cast!

Necromancer의 이미지

man nohup

Written By the Black Knight of Destruction

익명 사용자의 이미지

윈도우라고 질문자가 글을 썼는데 nohup이나 screen을 추천하는 건 좀 그렇지 않나요?

Necromancer의 이미지

이 게시판은 리눅스 프로그래밍 질답이 주라서 이와 연관이 전혀 없는 윈도우 질문에는 이런일이 잘 벌어집니다. 일단 리눅스 프로그래밍 질문으로 보고 답글 달게 되니까요.

답 드린다면 윈도우에서 그거 원하신다면 서비스로 만드셔야 합니다.
윈도우 프로세스 관리 방식상 이거 외는 안되는걸로 알고 있습니다.

Written By the Black Knight of Destruction

chanik의 이미지

http://snoopybox.co.kr/1674

Sysinternals Suite에 포함되어 있는 PsExec를 써서 아래와 같이 하면
타겟PC에서 ccc가 실행되고 psexec는 ccc의 종료를 기다리지 않고 바로 리턴됩니다.

c:\> psexec -u Administrator -p password \\target-pc -d c:\path\to\ccc.exe
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - <a href="http://www.sysinternals.com" rel="nofollow">www.sysinternals.com</a>
 
 
c:\path\to\ccc.exe started on target-pc with process ID 6488.
 
c:\> 

실행디렉토리를 지정하려면 -w 옵션을 쓰고,
GUI를 통해 사람이 조작해야 하는 프로그램이라면 -i 옵션을 쓰면 되는 모양입니다.
(GUI가 있더라도 사람의 조작이 필요없으면 -i 옵션 안 써도 되고요)

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.