Skip to content

Commit

Permalink
use syswrite instead of print for sending sysrq
Browse files Browse the repository at this point in the history
to avoid buffering inside of perl
  • Loading branch information
adrianschroeter committed May 20, 2020
1 parent e0e16cb commit 90f4fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-vm-kvm
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ vm_cleanup_kvm() {
vm_sysrq_kvm() {
perl -e 'use Socket; socket(SOCK, PF_UNIX, SOCK_STREAM, 0) || die("socket: $!\n");
connect(SOCK, sockaddr_un("'"$VM_ROOT.qemu/monitor"'")) || die("connect: $!\n");
print SOCK "sendkey alt-print-'$1'\n";'
syswrite SOCK "sendkey alt-print-'$1'\n";'
}

vm_wipe_kvm() {
Expand Down

0 comments on commit 90f4fb8

Please sign in to comment.