I got a ASP.NET Core 2.0 WEB-API and it should work on kestrel because it will be hostet there. When I start with Kestrel (look at my launchSettings below) there is a POST and I always get a 500 returning without going into the code. Means I leave breackpoints everywhere and when I execute the POST in Swagger no breakpoint
Tag: c++
Unable to exit while loop after reading information written to pipe
TLDR: You have to close the write end of all pipes in all children. The read will detect EOF only if no process has the write end still open. Credits to @Bodo As part of an assignment for an operating systems course, I’m trying to read lines from a file which is in the format of x operand y and
c++ close a open() file read with mmap
I am working with mmap() to fastly read big files, basing my script on this question answer (Fast textfile reading in c++). I am using the second version from sehe answer : and it works just great. But if I implement it over a loop of several files (I just change the main() function name to: and then get the
clangd on linux cannot find default headers
I’ve installed the newest LLVM toolchain from the official PPA, including clang, clang-tools-extra, lldb, lld, libc++ and libc++abi. I’m trying to use clangd with emacs + lsp. All works fine except clangd cannot find default headers like memory, vector and so on. My code is fine, it is normally compiled using clang. My compile_commands.json also okay. How to make clangd
Where is ssize_t defined in Linux?
OS: Debian 9 (Linux 4.9) Compiler: GCC 8.2 Currently I am including <stddef.h> (where size_t is defined) and <stdint.h> (where most integral types are defined), but I still don’t have ssize_t. Where is it defined? Answer ssize_t is defined in sys/types.h. Per the POSIX documentation: NAME sys/types.h – data types SYNOPSIS DESCRIPTION The header shall define at least the following
Why is stat::st_size 0 for devices but at the same time lseek defines the device size correctly?
I noticed that when I query the size of a device using open + lseek, everything is OK, but when I stat the device, I get zero instead of the real device size. The device is clean without any file system and the first bytes of device start with some text like “1234567890ABC”. What is wrong? The code: Output: If
Creating a new file from a cpp program in Ubuntu [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago. Improve this question How do I create a new file from a cpp program in Ubuntu, and is it any different from windows. Answer Declare a stream class
Resubmitting DMA Engine transactions
I’m writing a custom high-speed Linux SPI driver for an embedded SoC. To send data to the SPI peripheral (DMA_MEM_TO_DEV) I’m the Linux DMA Engine API. https://www.kernel.org/doc/Documentation/dmaengine/client.txt Based on the documentation, the steps for setting up and executing a DMA transaction are: Allocate a DMA slave channel : dma_request_channel Set slave and controller specific parameters : dmaengine_slave_config Get a descriptor
How to get fully interactive bash terminal in C with shift + ctrl keys?
I want to know how to create a fully interactive terminal. I am creating an interactive bash terminal like this: I can then go on to use read()/write() to send commands and receive output. My problem is how do I automate CTRL & SHIFT keys? Python’s subprocess does this so it’s definitely possible. How to send ctrl-c to kill foreground
getline() is repeatedly reading the file, when fork() is used
I am developing a simple shell program, a command line interpreter and I wanted to read input from the file line by line, so I used getline() function. At the first time, the program works correctly, however, when it reaches the end of the file, instead of terminating, it starts to read a file from the start and it runs