From: loreb <loreb@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: recutils: patch to fix recins not working outside of $TMPDIR
Date: Mon, 17 May 2021 15:12:03 +0200 [thread overview]
Message-ID: <20210517131203.NaUzIGQKbPz624zj-71ZywGbdU5roDwMy48HqXt5wK4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30567@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
New comment by loreb on void-packages repository
https://github.com/void-linux/void-packages/pull/30567#issuecomment-842312800
Comment:
After 10 days with no answer on the mailing list, since this only requires a single function to copy one file, how about shelling out to /bin/cp? eg
```
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static int qcopy_file_preserving(const char *src, const char *dst)
{
int stat_loc;
pid_t pid = fork();
if (pid < 0) {
perror("fork");
return -1;
}
if (pid == 0) {
execl("/bin/cp", "--", src, dst, (void *)0);
exit(1);
}
if (pid != waitpid(pid, &stat_loc, 0)) {
perror("waitpid");
return -1;
}
if (!(WIFEXITED(stat_loc) && WEXITSTATUS(stat_loc) == 0)) {
return -1;
}
return 0;
}
```
should work fine until upstream makes a new release, right?
next prev parent reply other threads:[~2021-05-17 13:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 21:30 [PR PATCH] " loreb
2021-04-28 21:38 ` [PR REVIEW] " ericonr
2021-04-28 21:46 ` [PR PATCH] [Updated] " loreb
2021-04-28 21:48 ` [PR REVIEW] " loreb
2021-04-28 21:52 ` ericonr
2021-04-28 21:55 ` loreb
2021-04-28 21:58 ` loreb
2021-04-28 21:58 ` [PR PATCH] [Updated] " loreb
2021-05-17 13:12 ` loreb [this message]
2021-06-07 15:44 ` loreb
2021-06-08 2:29 ` ericonr
2021-06-08 12:54 ` [PR PATCH] [Updated] " loreb
2021-06-08 13:02 ` loreb
2021-06-08 13:21 ` [PR REVIEW] " ericonr
2021-06-08 13:21 ` ericonr
2021-06-08 13:21 ` ericonr
2021-06-08 14:33 ` [PR PATCH] [Updated] " loreb
2021-06-08 14:34 ` [PR REVIEW] " loreb
2021-06-08 14:35 ` loreb
2021-06-08 15:17 ` [PR PATCH] [Updated] " loreb
2021-06-08 15:19 ` [PR REVIEW] " loreb
2022-05-18 2:09 ` github-actions
2022-05-18 14:46 ` loreb
2022-05-18 14:46 ` [PR PATCH] [Closed]: " loreb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210517131203.NaUzIGQKbPz624zj-71ZywGbdU5roDwMy48HqXt5wK4@z \
--to=loreb@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).