Skip to main content
added 187 characters in body
Source Link
hudac
  • 791
  • 2
  • 7
  • 19

I have this makefile:

all: 
        sudo watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminalor any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarificationA clarification: watch is just a reproductible examplereproductible example. I'm using another app that should run as daemon, andbut still ruins the terminal.


Edit: I start this app (on this example, the app is watch) with sudo
A workaround is to start it without sudo - then the terminal isn't ruined.
The disadvantage in that is, that I need to chown this process to not be root:root.

I have this makefile:

all: 
        sudo watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.


Edit: I start this app (on this example, the app is watch) with sudo

I have this makefile:

all: 
        sudo watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, but still ruins the terminal.


Edit: I start this app (on this example, the app is watch) with sudo
A workaround is to start it without sudo - then the terminal isn't ruined.
The disadvantage in that is, that I need to chown this process to not be root:root.

added 86 characters in body
Source Link
hudac
  • 791
  • 2
  • 7
  • 19

I have this makefile:

all: 
        sudo watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.


Edit: I start this app (on this example, the app is watch) with sudo

I have this makefile:

all: 
        watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.

I have this makefile:

all: 
        sudo watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.


Edit: I start this app (on this example, the app is watch) with sudo

added 140 characters in body
Source Link
hudac
  • 791
  • 2
  • 7
  • 19

I have this makefile:

all: 
        watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.

I have this makefile:

all: 
        watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?

I have this makefile:

all: 
        watch "ls -l" > /dev/null &
        @echo line 1
        @echo line 2
        @echo line 3
        @echo line 4

Running watch (or any other process that somehow changes the terminal) ruins the terminal. This is the output. You can see these big spaces. Also, I can't see the characters afterwards, when I write:

me@me:/tmp$ make
watch "ls -l" > /dev/null &
line 1
line 2
      line 3
            line 4
                  me@me:/tmp$ 

Is there a way to prevent a process changing the terminal?
A clarification: watch is just a reproductible example. I'm using another app that should run as daemon, and still ruins the terminal.

Source Link
hudac
  • 791
  • 2
  • 7
  • 19
Loading