File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 207
207
// by calling "fusermount" with an inherited file descriptor, but the
208
208
// same problem may occur for other file descriptors.
209
209
//
210
+ // 1c. If the executable is on the FUSE mount. In this case, the child
211
+ // calls exec, which reads the file to execute, which triggers an OPEN
212
+ // opcode. This can be worked around by invoking the subprocess
213
+ // through a wrapper, eg `bash -c file/on/fuse-mount`.
214
+ //
210
215
// 2. The Go runtime uses the epoll system call to understand which
211
216
// goroutines can respond to I/O. The runtime assumes that epoll does
212
217
// not block, but if files are on a FUSE filesystem, the kernel will
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ func TestExec(t *testing.T) {
173
173
tc := newTestCase (t , & testOptions {attrCache : true , entryCache : true })
174
174
tc .writeOrig ("test.sh" , "#!/bin/sh\n true\n " , 0755 )
175
175
fn := tc .mntDir + "/test.sh"
176
- if err := exec .Command (fn ).Run (); err != nil {
176
+ if err := exec .Command ("bash" , "-c" , fn ).Run (); err != nil {
177
177
t .Fatalf ("Run: %v" , err )
178
178
}
179
179
}
You can’t perform that action at this time.
0 commit comments