QEMU no terminal output after execvp

Maciej Bielski

QEMU is used by me as an emulator with PetaLinux kernel (terminal-only with -nographic option).

At the beginning QEMU initializes itself and once it's ready it boots-up the system. Usually, boot messages are printed in a terminal during the process. With that scenario everything works fine, system starts and one can login and use the system. Then, another simple peripheral device is implemented, which similarly is initialized (printing control message to the output) and the rest goes on the same way.

The problem rises when there is a child process spawned from inside the peripheral implementation ( fork() followed by execvp() ). The main QEMU process (parent) no longer prints to the terminal output, the new process (child) only can do it. It seems like the parent process is probably still executing but loses the terminal. Without it one cannot see login prompt, so basically cannot use the system at all.

What is the reason?

Maciej Bielski

I found the solution. The problem was because the child process was using SIGUSR1 to signal some event to the parent process. Apparently, QEMU itself uses SIGUSR1 so there was a collision of handlers, maybe both of them had been invoked, and somehow the parent process was freezing. Everything works fine after changing my signal to SIGUSR2. Hopefully there is no more collision with QEMU internals.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

QEMU no terminal output after execvp

From Dev

qemu -nographic no output in terminal

From Dev

redirect QEMU window output to terminal running qemu

From Dev

How to redirect QEMU -serial output to both a file and the terminal or a port?

From Dev

execvp , redirecion of output of ls

From Dev

putting output of execvp into string

From Dev

Get terminal output after a command swift

From Dev

Restore terminal output after exit program

From Dev

Streaming execvp output via socket

From Dev

Streaming execvp output via socket

From Dev

Less output does not show output in terminal after quitting it

From Dev

Less output does not show output in terminal after quitting it

From Dev

execvp() not processing writing to output >filename.log

From Dev

real-time search in terminal output stream; after running a command

From Dev

Restoring output to the terminal after having issued "exec &>filename"

From Dev

real-time search in terminal output stream; after running a command

From Dev

How to handle tabulated terminal output after NSTask command execution with Swift

From Dev

Main Window closes after execvp() call

From Dev

QeMU breaking after GCC upgrade

From Dev

How to redirect command output using os.execvp() in python

From Dev

Write QEMU booting virtual machine output to a file

From Dev

GPU Passthrough with qemu - no video output (AMD 7970)

From Dev

Can't get Qemu output through SSH

From Dev

Get terminal output into code

From Dev

redirect output to terminal

From Dev

Pausing and restarting terminal output

From Dev

Indenting terminal/shell output

From Dev

Python output on file and terminal

From Dev

Catching Terminal Output in Python

Related Related

HotTag

Archive