G-WAN is the site for a proprietary, freeware high-performance web server scripted in C and other languages.
HN commenters mention it in discussions of C web frameworks and fast servers, noting it is freeware rather than open source.
I think there are multiple things wrong with the original question:
- It's unclear what they're trying to judge. Do they want to know if someone understands filesystems on an intimate level? Do they want to know if someone knows how hardlinks work? Do they want to know if someone knows what fstat returns? Are they trying to trick someone since an inode in many contexts is just a number? This is an unnecessary level of uncertainty for a question and encourages random tangents which may not be the answer the interviewer is looking for or cares about.
- Someone who has studied google's standard questions which this apparently may be one of [1] would be able to answer this without understanding the implications, what does that tell you about the candidate?
- If you want the candidate to go into a tangent about filesystems in order to figure out how well they understand them, this is as mentioned before a really stupidly open ended question.
- If someone did understand you were talking about inodes, they may be of the opinion that the inode contains a reference to the file's contents and as such contains the file contents. In the case of a directory this means that an inode "contains" the file names of files in that directory. This makes the question a leading question which is trying to lead to what would be a wrong answer from that person's point of view. How do you answer a leading question when you disagree with what it's trying to lead you to?
If you want to determine…
Reading more closely, it sounds like they are not interviewing him for a director of engineering position; it just sounds like he thinks his current role, CEO-who-writes-code of a very small software company (http://www.gwan.com/about), qualifies him for a director-of-engineering-level position. He's probably being interviewed for an SRE team lead or thereabouts.
Why he's being interviewed for that position is a different question entirely, and I can imagine Google being totally right or totally wrong.
One of the recent stories indicated border agents were literally comparing answers against a Wikipedia article; if you didn't have the answer in the Wikipedia article, you were wrong.
This would be in line with, for example, how Google does early-stage screening -- non-technical people are given a sheet of questions, and if you give an answer that's not verbatim what's on the sheet you're "wrong" and "not qualified" (see http://www.gwan.com/blog/20160405.html).
Obligatary on-topic comment: seems like a lot of code for a not a lot of result; I would like to see templates (with optional template parms) used to provide the 'usual' values.
(yes I know templates aren't C, but you can use them minimalistically since they're orthogonal to the rest of C++.)
Digression comment: Has anyone used GWAN? It looks awesome, but the website hints at some eccentricity.
http://gwan.com/
Because it caches (http://gwan.com/faq#cache) response under high concurrencies. Try to benchmark this code:
#include "gwan.h" // G-WAN exported functions
int count=0;
int main(int argc, char *argv[])
{
if (!count) printf("New Counter!\n");
xbuf_xcat(get_reply(argv), "Hello World %d",count++);
return 200; // return an HTTP code (200:'OK')
}
The last I looked at this, code still had to be written in C (which was actually kind of fun - wrote my own small framework).
Nowadays we get all the popular languages (http://gwan.com/faq#languages) and as long as you're okay with freeware (not open-source), it's worth looking at for high-speed web calls.