1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

23 commits

Author SHA1 Message Date
Andy Wingo
85433fc2b1 Add mkstemp; undocument mkstemp!
* doc/ref/posix.texi (File System): Update to document mkstemp only.
* libguile/filesys.c: Make a mkstemp that doesn't modify the input
template.  Instead the caller has to get the file name from
port-filename.
(scm_mkstemp): Use the new mkstemp to implement mkstemp!.  Can't
deprecate yet though as the replacement hasn't been there for long
enough.
* libguile/posix.c (scm_tempnam): Update to mention mkstemp instead.
* module/system/base/compile.scm (call-with-output-file/atomic): Use
mkstemp.
* test-suite/tests/posix.test:
* test-suite/tests/r6rs-files.test: Use mkstemp.
* NEWS: Update.
2021-03-10 20:40:10 +01:00
Mike Gran
d6afb41192 don't test crypt if not present
* test-suite/tests/posix.test (crypt):  throw unsupported if crypt not presetnt
2021-01-23 12:10:22 -08:00
Mike Gran
a5df94e78c Fix binary output on files created by mkstemp!
Some operating systems require a O_BINARY flag.

* libguile/filesys.c (scm_i_mkstemp): Don't mask out O_BINARY flag
* test-suite/tests/posix.test ("binary mode honored"): new test
2019-05-23 17:30:33 +02:00
Ludovic Courtès
827e88b4b7 Define AT_SYMLINK_NOFOLLOW et al.
* libguile/posix.c (scm_init_posix): Define AT_SYMLINK_NOFOLLOW,
AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH when available.
(scm_utime): Mention AT_SYMLINK_NOFOLLOW.
* doc/ref/posix.texi (File System): Update accordingly.
* test-suite/tests/posix.test ("utime")["AT_SYMLINK_NOFOLLOW"]: New test.
2019-05-23 15:43:28 +02:00
Andy Wingo
667e511dc3 Fix crypt-on-glibc test error
* test-suite/tests/posix.test ("crypt"): Allow for the given salt being
  valid.  Thanks to Jonathan Brielmaier for the report and debugging!
2019-02-01 18:00:51 +01:00
Ludovic Courtès
a4c4deb5b0 Fix 'crypt' deadlock upon error.
* libguile/posix.c (scm_crypt): Take 'scm_i_misc_mutex' right before
calling 'crypt'.  Move 'SCM_SYSERROR' call after 'scm_dynwind_end'.
* test-suite/tests/posix.test ("crypt"): New test prefix.
2018-08-07 11:34:02 +02:00
Ludovic Courtès
70d8ef786a tests: Gracefully handle ENOSYS return for 'setaffinity'.
Fixes <http://bugs.gnu.org/19646>.
Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>.

* test-suite/tests/posix.test ("affinity")["setaffinity"]: Wrap in
  'catch' and throw 'unresolved upon ENOSYS.
2016-05-22 19:09:33 +02:00
Eli Zaretskii
8c6b62e7d5 Untabify some test files.
* test-suite/tests/ports.test: Untabify.
* test-suite/tests/posix.test: Untabify.
* test-suite/tests/r6rs-files.test: Untabify.
2014-07-03 21:02:23 +03:00
Eli Zaretskii
bc945fadd2 More fixes for deleting files whose ports are not closed.
* test-suite/tests/r6rs-files.test: Close the port after
	using it.

	* test-suite/tests/posix.test ("mkstemp!"): Close the port after
	using it.
2014-07-02 21:21:52 +03:00
Ludovic Courtès
c23fb152b7 tests: Remove leftover `pk'.
* test-suite/tests/posix.test ("system*"): Remove `pk'.
2012-12-19 23:31:05 +01:00
Ludovic Courtès
668ba7c955 Change `system*' to not leave dangling processes behind.
Fixes <http://bugs.gnu.org/13166>.

* libguile/simpos.c (scm_system_star): In the child, call `_exit'
  instead of `SCM_SYSERROR' when `execvp' fails.
* test-suite/tests/posix.test ("system*"): New test prefix.
2012-12-19 23:15:45 +01:00
Ludovic Courtès
d20912e67d Move {total,current}-processor-count' outside of posix.c'.
* libguile/posix.c (scm_total_processor_count,
  scm_current_processor_count): Move to...
* libguile/threads.c: ... here.

* libguile/posix.h (scm_total_processor_count,
  scm_current_processor_count): Move declarations to...
* libguile/threads.h: ... here.

* test-suite/tests/posix.test ("nproc"): Move tests to...
* test-suite/tests/threads.test: ... here.
2011-04-25 22:41:58 +02:00
Ludovic Courtès
f0c0141fe4 Add total-processor-count' and current-processor-count'.
* libguile/posix.c (scm_total_processor_count,
  scm_current_processor_count): New functions.

* libguile/posix.h (scm_total_processor_count,
  scm_current_processor_count): New declarations.

* test-suite/tests/posix.test ("nproc"): New test prefix.

* doc/ref/posix.texi (Processes): Document `total-processor-count' and
  `current-processor-count'.
2010-12-07 23:13:20 +01:00
Ludovic Courtès
fe613fe25d Add bindings to GNU sched_setaffinity' and sched_getaffinity'.
* configure.ac: Add checks for `sched_setaffinity' and
  `sched_getaffinity'.

* doc/ref/posix.texi (Processes): Document `getaffinity' and
  `setaffinity'.

* libguile/posix.c (cpu_set_to_bitvector,
  scm_getaffinity)[HAVE_SCHED_GETAFFINITY]: New functions.
  (scm_setaffinity)[HAVE_SCHED_SETAFFINITY]: New function.

* libguile/posix.h (scm_getaffinity, scm_setaffinity): New declarations.

* test-suite/tests/posix.test ("affinity"): New test prefix.
2010-12-03 00:38:29 +01:00
Ludovic Courtès
adfb428466 Fix use of utimensat(2).
* libguile/posix.c (scm_utime): Use "#ifdef HAVE_UTIMENSAT", not "#if
  HAVE_UTIMENSAT".  Fix GCC warning around call to utimensat(2):
  "passing argument 3 of 'utimensat' from incompatible pointer type".

* test-suite/tests/posix.test ("utime"): New test prefix.
2010-01-19 00:23:33 +01:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
a1ef740636 Changes from arch/CVS synchronization 2007-06-07 08:36:13 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Kevin Ryde
95c098ddd9 (mkstemp!): New tests. 2004-08-20 01:36:28 +00:00
Kevin Ryde
c2d31141dc (execl, execlp, execle): Exercise errors where
program not found.  [But disabled, due to problems with threading.]
2004-02-28 23:07:56 +00:00
Kevin Ryde
32bb5bd88c (execl, execlp, execle): Exercise errors where program not found. 2004-02-28 21:37:41 +00:00
Kevin Ryde
0d2cf5b556 New file, exercising putenv, setenv, unsetenv. 2003-06-19 01:42:28 +00:00