Hi Daniel

What I can reproduce is that you get a 
"Resource temporarily unavailable" message for this line

quartz:/home/ola/svn/t# vzctl enter 201 --exec exit ; read a
entered into CT 201
exit 
root@test1:/# exit 
logout
exited from CT 201
bash: read: read error: 0: Resource temporarily unavailable

But not when you do it without --exec.

quartz:/home/ola/svn/t# vzctl enter 201                     
entered into CT 201
root@test1:/# exit 
logout
exited from CT 201
quartz:/home/ola/svn/t# read a
^C
No problem this time.

And not with:
quartz:/home/ola/svn/t# vzctl enter 201
entered into CT 201
root@test1:/# read a
^C
root@test1:/# exit
logout
exited from CT 201
And no problem here.

When you do a enter and --exec I do not think you actually have
any stdin available. I may be wrong here but enter is special
in that sense. I think the same applies when you do chroot.

If you want I can forward this bug report to upstream but first
I need to understand a bit more about your problem. Is it
one of the following?

1) You do not have a stdin in commands that you use with --exec ?
2) That you get resource unavailable also after you have exited
  from the CT?
3) Something else?

Best regards,

// Ola


On Wed, Aug 17, 2011 at 12:40:31AM +0200, Daniel Alder wrote:
> Package: vzctl
> Architecture: i386
> Version: 3.0.24-12
>
> Try the following command lines in bash:
>
> ----
> $ set -x
> $ vzctl enter 222 --exec exit ; read a
> + vzctl enter 222 --exec exit
> entered into CT 222
> exit
> root@durin:/# exit
> logout
> exited from CT 222
> + read a
> -bash: read: read error: 0: Resource temporarily unavailable
> $
> $ read a
> + read a
> here i can type
> $
> ----
>
> The command which follows after the vzctl call does not work if it uses  
> stdin. A command like apt-get will even switch to non-interactive mode.
>
> The strange thing is, that the next command typed at the command line  
> works without problems.
>
> When using the same commands in a script file, stdin is blocked until  
> the end of script execution, which makes it impossible for me to do some  
> batch jobs.
>
>
> "vzctl enter 222 --exec exit" was only an example. you can also try  
> "vzctl enter 222" and type exit manually
>
>
> When using the above commands using dash 'read' outputs the following  
> message: "turning off NDELAY mode"
>
>
>

-- 
 --------------------- Ola Lundqvist ---------------------------
/  o...@debian.org                     Annebergsslingan 37      \
|  o...@inguza.com                      654 65 KARLSTAD          |
|  http://inguza.com/                  +46 (0)70-332 1551       |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to