xmonad/xmonad-testing

cp: cannot create regular file '/home/.../.xmonad/xmonad-x86_64-linux` Text file busy

crocket opened this issue · 3 comments

~/.xmonad/build

#!/bin/sh -eu

EXE_NAME=xmonad-exec
OUTPUT=$1

stack build
cp -u `stack exec which $EXE_NAME` $OUTPUT

When I press Mod+q to restart XMonad, I see the following errors in xmessage.

Error detected while loading xmonad configuration file: /home/guardian/.xmonad/xmonad.hs
my-xmonad-conf-0.0.0: unregistering (local file changes: xmonad.hs)
my-xmonad-conf-0.0.0: build (lib + exe)
Preprocessing library my-xmonad-conf-0.0.0...
Preprocessing executable 'xmonad-exec' for my-xmonad-conf-0.0.0...
[1 of 1] Compiling Main             ( xmonad.hs, .stack-work/dist/x86_64-linux-ncurses6/Cabal-1.24.2.0/build/xmonad-exec/xmonad-exec-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux-ncurses6/Cabal-1.24.2.0/build/xmonad-exec/xmonad-exec ...
my-xmonad-conf-0.0.0: copy/register
Installing library in
/home/guardian/.xmonad/.stack-work/install/x86_64-linux-ncurses6/lts-8.12/8.0.2/lib/x86_64-linux-ghc-8.0.2/my-xmonad-conf-0.0.0-8nPXW84KMRtC7tbNBwzyZ5
Installing executable(s) in
/home/guardian/.xmonad/.stack-work/install/x86_64-linux-ncurses6/lts-8.12/8.0.2/bin
Registering my-xmonad-conf-0.0.0...
cp: cannot create regular file '/home/guardian/.xmonad/xmonad-x86_64-linux': Text file busy

Please check the file for errors.

I will move this issue to xmonad.

I think this repository might be the right place to report this issue.

I surmise xmonad --recompile or xmonad-x86_64-linux prevents ~/.xmonad/xmonad-x86_64-linux from being rewritten by cp from ~/.xmonad/build.

Ok, I think I found the cause of the issue. Moving this issue to xmonad.