프로세스 실행에 대한 cygwin의 경고를 억제합니다.

프로세스 실행에 대한 cygwin의 경고를 억제합니다.

cygwin 터미널 창을 닫으면 다음과 같은 메시지가 표시됩니다.

Processes are running in session.
<list of processes>
Close anyway?
---------------------------
OK   Cancel   
---------------------------

그리고 매번 OK 버튼을 누르는 걸 싫어해요. 이 성가신 경고를 억제하는 방법은 무엇입니까? 이 문제를 구글링하는 데 지쳤습니다…

저는 Win7-10 환경에서 작업 중입니다.

답변1

이렇게 하면 됩니다.

mintty.exe -o ConfirmExit=no

이는 바로가기 *.lnk파일에 매우 유용합니다. 예를 들어, 다음은 로그를 보기 위해 만든 링크입니다 tail -f.

C:\tools\cygwin\bin\mintty.exe -o ConfirmExit=no -s 54,78 -e /usr/bin/bash -l -c 'tail -n 200 -f /cygdrive/c/logs/NSSM.log'

그러면 -s 54,78창이 디스플레이의 전체 높이와 정확히 로그 항목의 너비가 됩니다. -l -cbash가 실행 파일을 찾을 수 있도록 하기 위해 필요합니다 .$PATH

보다:

$ mintty.exe --help
Usage: mintty [OPTION]... [ PROGRAM [ARG]... | - ]

Start a new terminal session running the specified program or the user's shell.
If a dash is given instead of a program, invoke the shell as a login shell.

Options:
  -c, --config FILE     Load specified config file (cf. -C or -o ThemeFile)
  -e, --exec ...        Treat remaining arguments as the command to execute
  -h, --hold never|start|error|always  Keep window open after command finishes
  -p, --position X,Y    Open window at specified coordinates
  -p, --position center|left|right|top|bottom  Open window at special position
  -p, --position @N     Open window on monitor N
  -s, --size COLS,ROWS  Set screen size in characters (also COLSxROWS)
  -s, --size maxwidth|maxheight  Set max screen size in given dimension
  -t, --title TITLE     Set window title (default: the invoked command) (cf. -T)
  -w, --window normal|min|max|full|hide  Set initial window state
  -i, --icon FILE[,IX]  Load window icon from file, optionally with index
  -l, --log FILE|-      Log output to file or stdout
      --nobidi|--nortl  Disable bidi (right-to-left support)
  -o, --option OPT=VAL  Set/Override config file option with given value
  -B, --Border frame|void  Use thin/no window border
  -R, --Reportpos s|o   Report window position (short/long) after exit
      --nopin           Make this instance not pinnable to taskbar
  -D, --daemon          Start new instance with Windows shortcut key
  -H, --help            Display help and exit
  -V, --version         Print version information and exit
See manual page for further command line options and configuration.

-o다음 위치 에 대한 옵션을 찾았습니다.https://mintty.github.io/mintty.1.html#CONFIGURATION

답변2

약간 혼란스러우신 것 같습니다. cygwin은 공유 라이브러리입니다.
해당 라이브러리를 사용하는 프로그램을 실행 중입니다.

나는 상황을 설명하려고 노력할 것입니다 :

물론 명령 셸(bash)을 호출하는 터미널(mintty)을 시작했습니다. 명령 셸에서 추가 프로그램을 실행하면 프로세스 트리는 다음과 같습니다.

$ pstree
?───mintty───bash───pstree

미니멀트리 케이스입니다.

쉘에서 추가 프로그램을 실행하고 기다리지 않거나 종료를 요청하지 않으면 mintty가 자체적으로 종료하도록 요구할 때 실행 중인 프로세스가 있고 아버지 프로세스(mintty)를 닫으면 모든 프로세스가 강제로 종료된다는 점을 강조할 것입니다. 아이들. 유일한 하위 항목이 명령 셸이고 비활성 상태인 경우 mintty는 확인이 필요하지 않으며 자체 및 셸을 종료합니다.

따라서 모든 자식을 죽일 것인지 확인하려면 mintty stop을 위해 실행 중인 모든 프로세스를 종료해야 합니다.

관련 정보