mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-22 21:37:22 +00:00
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
27 lines
493 B
C++
27 lines
493 B
C++
/*
|
|
* Copyright (c) 2018-2020, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main()
|
|
{
|
|
int fd = open("hax", O_CREAT | O_RDWR, 0755);
|
|
ftruncate(fd, 0);
|
|
close(fd);
|
|
|
|
int rc = execlp("hax", "hax", nullptr);
|
|
int saved_errno = errno;
|
|
unlink("hax");
|
|
if (rc == -1 && saved_errno == ENOEXEC) {
|
|
printf("FAIL\n");
|
|
return 1;
|
|
}
|
|
printf("PASS\n");
|
|
return 0;
|
|
}
|