File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1111 git clone --branch releng/14.3 https://git.FreeBSD.org/src.git /usr/src
1212 fi;
1313 build_script :
14+ - mount
1415 - ./Configure -n freebsd
1516 - make
1617 test_script :
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ int main(int argc, char **argv) {
5050 char buffer [128 ];
5151 struct stat exec_stat ;
5252 struct stat cwd_stat ;
53+ struct stat tmp_stat ;
5354 int fd ;
5455 int round ;
5556 int exec_found ; /* executable found in result */
@@ -77,6 +78,10 @@ int main(int argc, char **argv) {
7778 "Cannot create 'LTbasic2-tmp' in current directory, "
7879 "skipping fd check\n" );
7980 fd_found = 1 ;
81+ } else {
82+ /* on FreeBSD 14.3, the path for newly created file is not returned
83+ * immediately, so let's trigger it */
84+ stat ("LTbasic2-tmp" , & tmp_stat );
8085 }
8186
8287 ctx = lsof_new ();
@@ -135,7 +140,10 @@ int main(int argc, char **argv) {
135140 fprintf (stderr , "ERROR!!! opened regular file wasn't found.\n" );
136141 }
137142 /* cleanup created temporary file */
138- unlink ("LTbasic2-tmp" );
143+ if (fd >= 0 ) {
144+ close (fd );
145+ unlink ("LTbasic2-tmp" );
146+ }
139147 if (!(exec_found && cwd_found && fd_found )) {
140148 return 1 ;
141149 }
You can’t perform that action at this time.
0 commit comments