Mailinglist Archive: opensuse-bugs (6470 mails)

< Previous Next >
[Bug 1124481] [Build 20190201] openQA test fails in lvm_thin_check - bash v5 file descriptors for ~/.bash_history
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Fri, 19 Jul 2019 03:32:56 +0000
  • Message-id: <>

--- Comment #15 from heming zhao <heming.zhao@xxxxxxxx> ---
I have no idea about who opens the .bash_history file.
From first Description (comment #0) of Martin Loviska, lvm2 as a bash child,
just closed its fd[3], but his parents fd[3] was still opened.
There are lots of test cases running before lvm2, any of them may cause this

I only quickly grep 'grub2' source code, and there is no keyword of
and I also think the bash is correct.

there is a example to trigger this bug, which copied from redhat bugzilla:

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>

int main() {
char buf[] = "pvdisplay; lsof -p $$";
char fd_name[256];
int fd[2], s;


if (fork()) {
write(fd[1], buf, sizeof(buf));
return 0;

sprintf(fd_name, "/dev/fd/%d", fd[0]);
execl("/bin/bash", "bash", fd_name, NULL);

compiling: gcc file.c
run it with root.

You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >