detached directories

June 18, 2007

So one thing I wanted for my Graphical Boot stuff was a standalone environment for it to work in. I wanted it to have its own /proc, device nodes, etc, because it gets run so early in the boot process that those things aren’t set up yet globally. If I make my program set them up globally, then other parts of the boot process get confused that things are set up already. What I really want is my own private directory that only my process can see and that goes away when my process exits.

This is something you can do with individual files pretty easily. Something like:

int fd;
char file[] ="/tmp/XXXXXX";
fd = mkstemp (file);
unlink (file);

It turns out you can do something similar with directories, too, although there are some caveats. If your program

  1. creates a temp directory
  2. mounts a ram filesystem in the directory
  3. opens the directory and stores the file descriptor somewhere
  4. lazily unmounts the ram filesystem
  5. remove the temp directory

Then the directory will no longer be visible from the filesystem, but will exist as long as the stored file descriptor is opened. The program can fchdir() to the directory using the saved file descriptor and work with it. Now some of the caveats are:

  1. the program needs to be root to mount the filesystem
  2. MNT_DETACH (the mount flag used to lazily unmount a filesystem) is unsupported api
  3. you can’t mount other filesystems in your detached directory

Overall, it’s kind of a neat concept, but those caveats make it fairly impractical to use.

August 28, 2004

Well the last couple of weeks have been very fun.

The girl I mentioned previously, Mo, was an intern at Red Hat, but grad school was starting back up for her, so she had to move back to New York, which sorta sucks a lot. Yet, despite the fact that she moved back to New York last week, I saw her everyday except for yesterday last week. That’s right, she was either driving to my apartment in Nashua or from my apartment to New York everyday last week but yesterday. It was possible because this first week at her University was orientation (not classes) and so her schedule was really open.

Here’s a couple of pics of her:

She’s a very talented individual who is very skilled in Linux, Human Computer Interaction, artistic things, and Hello Kitty.

Let’s see, different topics….

I love Indian food. I eat it far too much now in fact. It doesn’t help that there is an Indian market store right down the street, and an insanely good Indian Restaurant a few miles away.

ummm…here’s a picture of me after my hair cut..kinda a junk picture though, cause my hair is wet and messy and i’m sorta unshaven…

Ummm, what else… I can’t really remember what’s happened lately.

Oh, car trouble…So Mo got a flat the other day (this was the night before the last day of her internship, the thursday night before last thursday), and she didn’t want to drive on the spare very much, so we parked her car and I drove her to work the next day. The plan was that I would drive her to her car after work and we would go down to a tire shop and get it replaced. The next day it rained hard….very, very hard, and when we got into my car after work and tried to start it–nothing. Just click…click…click… So we called a tow truck and had it towed to an auto shop down the road. Preliminary analysis suggested it was the starter that had gone bad. They were really busy though, and they are kind far away from where I live so the mechanic spent a few minutes to see if he could get it started so we could take it somewhere else more near my apartment. Sure enough, after about 100 turns of the key he got the thing to start! Damn, I just paid 60 bucks for towing. Ah well, at least it started.

So the plan was, I’d take Mo to her car, we’d pick it up and take both cars to the same shop near my apartment. Her’s was just a flat tire, so we’d get it back later that night, and mine would need a starter replaced, so it was going to have to stay into the weekend.

It didn’t turn out that way, however. Her bearings were bad, too, so it had to stay at the shop like my car. We just walked the mile or so to my apartment and on the way stopped at blockbuster to rent some videos. We crashed and in the morning we walked back to the auto center (it’s part of Sears actually) and guess what? My starter wasn’t bad at all, just a wire that went bad–presumably because of the harsh, harsh rain. What a weird twist of events, uh?

August 18, 2004

I took earlier today off work and went down to Boston with a friend. We got haircuts at a small shop ran by a couple of friendly Japanese guys named Fred and Steven. This is a bit of a big event for me because I’ve had long hair for so long that there was a lot of inertia stopping me from going shorter. I was ready for a change though, so I just told Steven to do whatever he thought would look good. I really like how it turned out.

On a different note, I also really like how my relationship with my friend is turning out. I feel really comfortable around her. We have a pretty close connection I think. We have a very open line of communication, and so we don’t play ambiguous manipulation games which are the norm in a boy-meets-girl world.

August 13, 2004

Well, I guess I’ll update again.

Let’s see… Last friday I saw a movie. I don’t remember what movie though. Before the movie I ate at an Italian restaraunt that I can’t remember the name of. I do remember the waiter was named Hugo. What was really interesting, though, was the table at the restaurant came with crayons and a paper table cloth. I spent most of the night creating a truly delightful scribbly mess next to someone who could really draw. My drawing looked so bad next the nice drawing, I decided I would just start doing random things to my drawing in a last ditch effort to salvage the image as abstract art…didn’t work. When it was all said and done with, my drawing had so much wax on it that it waterproofed the paper.

After the movie, at about 1am or so, we all went down to Nalin’s apartment in Saugus and fun’d for the night. On my way there I picked up some ice cream and frozen fruits, which we used to make beer floats and smoothies respectively. So we drank, and played Dance, Dance Revolution, and threw juggling balls at each other until about 6am or so, and then we went to IHOP for some breakfast.

After that, I crashed for the day and then in the evening time we went to a rowdy bar called Dicks, where the waitresses put hats with obscenities on your head and just be all around rude (it’s all in good fun mind you). By the end of the night the table had gone to war with each other in an all out paper and ice throwing fight. A friend of mine that I have been too flirty with recently, was wearing my fedora and keeping me stocked with plenty of ammo as I assaulted Nalin. Actually, most of the table attacked Nalin and he did a really good job of blocking the onslaught. Also, a chick from another table was downing shot glasses off perversely named mixed drinks off John’s … uhhh … lap.

Umm, on Monday I went to a concert with a couple of friends to see Alanis Morrisette and Bare Naked Ladies. I bought an overpriced tube of glowing color while there and spun it around a bunch to make really neat, semi-transparent discs in the night sky. It was expensive, but as some chick behind me pointed out to me, it was still cheaper than the beer I was drinking. The concert was actually a lot more fun than I anticipated. By the end of it, the Bare Naked Ladies were dancing around, synchronized with shopping carts.

umm on Wednesday (I think) I went over to Chris’s house and did the hookah thing again (my second time). Less luck making smoke rings this time. I also watched a funny movie that I can’t remember anything about right now strangely enough, and went dangerously overboard with the flirting with the friend.

I decided to work from home today in an effort to be more productive. It didn’t work. I got less done than I probably would have at the office. Oh well. I’ll just make it up this weekend. I guess one of the advantages of having a job I love is, I don’t mind doing it on my days off when needed!

But now, i’m going to go pick up a pizza and head to Chris’s house to play doom 3.


August 2, 2004

I’d just like to take a moment to publically say congratulations to Stacie Fidler on her recent engagement.

Congratulations Stacie!

You’ve reached a pretty substantial turning point in your life and I wish you the very best.

July 14, 2004

Nothing much new to report. I went into boston with some of the Red Hat crew the other night. We walked around looking for a place to eat and finally landed at a Tex/Mex restaurant where I ordered a Mexican import beer called Sol and chicken fajitas. They only gave me 4 tortillas (which I guess is pretty typical), but I didn’t budget the first 3 well, so I had a massive amount of food left for the last one. I suppose I could have just quietly eaten my last fajita and then finished the remaining fill of black beans, rice, lettuce, peppers and chicken with my fork, but I didn’t.
No, I saw a challenge that I had to take head on. So, instead I decided to fill my last remaining tortilla to its absolute limits. I had it so full that I couldn’t even close it all the way. Luckily, (and to the great amusement of the people I was with) I managed to get the thing into my mouth enough to take a bite after a sufficient amount of manuevering, wiggling and squeezing.

And then we’re walking out of the restaurant some time later and we walk past this sign:

Now, you’ve got to wonder, “What happened before that sign was put up?” :-)

So after the meal we went and got ice cream at the same place I got the fudge on a previous weekend and then we went to a local tavern and ordered some drinks and chatted for a while. Toward the end, Nalin (a coworker) and I were both almost exactly half way through the drinks in front of us (he had a screwdriver, I had a vodka w/ cranberry) and so we decided to race. *Jug* *Jug* *Jug* *Spill* *Jug* *Jug* *Jug*. Damn Nalin beat me by a second and I got cranberry juice on my new shirt. ah well (spot remover got the stain out later).

We’re wondering where to go next, when we remembered that a lady walked up to us and handed us fliers for a club/bar called “Coyote Ugly” (presumably a knock off from the movie) earlier that day. So it’s on “Friend St” and that’s a fair distance away. We decide to go anyway, even though none of us had ever been to friend street before and we weren’t exactly sure how to get there.

On our way there a cute, but typsy girl walks up to me and tells me that she really likes my hat (the red fedora that I always wear), so we’re walking and talking for a while and she’s wearing my hat and then I eventually ask her if she knows where “Coyote Ugly” is and she says that she thinks it’s a couple miles in the direction opposite the way we were walking, she then points out there is a hooters in front of us though as an alternative. This was a bit interesting, because 1) hooters is more of a restaurant than a club/bar 2) It was late and hooters was closed and 3) someone from the group I came with (they were following behind me and the drunk chick) pointed out that there was a big sign for “Coyote Ugly” right next to the Hooters.

At any rate, we didn’t end up going in. Some of the guys in the group didn’t want to pay the cover, because it was way too crowded and they would have to leave soon anyway, because the T trains were shutting down within the next hour and half or so.

In other news, I got my license plates in the mail today:

Beware of hot stuff

July 7, 2004

I just want to take this time to remind those of you out there who iron that 1) irons are hot 2) ironing should be done fully clothed (even if you are ironing the shirt you are going to wear) 3) irons are hot

July 6, 2004

Well, the weekend was pretty fun I think. I went down into boston/cambridge twice. Once on the 3rd and once on the 4th. I have a friend from Hawai`i who used to live in Boston many years ago and had really fond memories of extremely good fudge from Quincy Market at a shop by the aquarium. So, me and a few of my friends from work went on a hunt for fudge. So we get there and eat at a cheers theme restaurant and then go in search of ice cream for dessert. Low and behold: a fudge shop materializes right in front of us. Could this be it? I wait in line for like 10 minutes or so and order 3 bricks of fudge (one for me and the people who came with me, one for my Hawai`i friend and one for his wife) and some ice cream. After I got them I asked the cashier if this was the only fudge shop around, and she said “basically yea, there used to be a shop that made really, really good homemade fudge, but they’re closed down now”. Bah! What a bummer. Ah well, at least I tried.

So then we decided to walk to a Pops concert which is like orchestra instrumentals of pop songs from the 1930s up to now. On our way there we walked past a performance going on at City Hall by a startup band called “On the Drop”. They were a really neat ska/rock band, so we chilled out on the steps for 45 mins or so and listened, then we went back to our trek across town to the park to listen to pops.

A weird coincidence is, Pops was playing about a block away from the original Cheers building (This is a coincidence because we ate at a cheers theme restaurant on the other side of town earlier that day). We still had about an hour to kill, so I went with one of the guys to the Cheers bar and checked it out. Only the outside looked the same. The inside was cramped, loud, we had to get our hands stamped, and it took a long time to get our beers.

Anyway, so we meet back up with the rest of the group and a few minutes later one of the guys gets a phone call…from me. Err, what?! Well, apparently I dropped my phone by a burrito stand as I was walking back and so the stand owners hit redial when they found it to try to find someone who knew who the phone belonged to.

So I get my phone back and finally the show starts. We listened to about 30 minutes of it and realized it wasn’t all that good. Right around the time David Lee Roth got on stage and started singing beach boys songs we left and walked to CBC, a microbrewing bar. There three of us ordered colored beer. I got red, John got white, and Dan got blue, in honor of the 4th of July.

The next day I went with one of the guys to an Eric Clapton concert at the Tweeter center. We wore our red fedora hats (we always do) and we were walking toward the center when this dude on a bike rides past us and says, “I like your hats”. He was wearing a similar, but black hat, so the dude I went with, Chris, yelled back “I liked yours, too”. This wouldn’t be that particularly interesting of an event (similar things happen all the time when we’re wearing our hats because they are so … different) except for the fact that we later found out that it was the lead dude in the opening act for Eric Clapton. I think his name was Robert Randolph or something.

Anyway, the concert was good, the fireworks after were really close and cool, but we were hoping to make it to Harvard Square or the river in time to see a more elaborate show. We arrived around 11:30 to Harvard Square and nothing was going on. By the time we walked to the river it was done, too, so we finally just called it a nice around 1:30 or so.

Yesterday, I bought a digital camera (a canon powershot A75), so maybe i’ll post pictures of my apartment and the area soon.

July 2, 2004

Well the DSL modem came in, so I have internet at home now (besides the various neighbors’ unrealiable, noisy wifi access). Yay.

Hmmm, what else…I took today off work and went and got my drivers’ license. Interestingly enough, I think I am the only person in New Hampshire with my birthday and a New Hampshire license. I say this because my birthday is 04/27/83 and my driver’s license number is clearly based on my birthday: 04SER27831. I’m assuming the next person with my birthday to get a license will be 04SER27832. Anyway, that’s kind of weird.

Another strange oddness is, I found out a couple of days ago that one of my old friends from Illinois (his name is Tom) is temporarily assigned to the same base as an old friend from Hawai`i (his name is Sage). So I told Tom about Sage and they might meet up :-). Such a small world…What’s even stranger is they aren’t even in the same branches of the military. Tom is Army Reserve and Sage is Navy.

Okay, i’m going to close with a quick rant about Fahrenheit 9/11. First off, let me just say that I am a very liberal guy. I’m not going to go into my political views too much, though, because everyone’s views are different, and there isn’t anything particularly useful about my political views that would aid me in my ranting.

Now the ranting…

The movie content was bad. It was really, entirely Michael Moore pushing his political agenda. It was completely unobjective and entrenched with out of context video clips, sound bites, and dubious presentations of evidence. Even the title was manipulative: Fahrenheit 9/11. The movie had very little to do with the 9/11 attacks, and instead was almost entirely focusing on Bush bashing (<– again, remember that I am a liberal guy saying this). That’s not to say it wasn’t funny. It really had some amazingly clever and funny parts to it. Also, the filmography and editing was very nice.

Anyway, I’m getting a bit tired to finish this movie bashing, so let me just close with a quote I made up early that I liked:

My point is I can’t in good conscious sum his facts together because they are like puzzle pieces that have been given some retrofitting with an exact-o knife–they may fit, but that doesn’t mean the picture they make is accurate.

June 26, 2004

Okay so it’s been a long while since I posted. ummm, I guess it’s cause I still don’t have internet at home. Hopefully, the DSL modem will be arriving in the mail any day now.

So, my job rocks. My coworkers rock, my boss rocks, my work is quite fun, and it’s just all around a great thing. I like New Hampshire/Massachusetts a lot, too. A few things I’ve noticed tho:

- There is a dunkin donuts at /EVERY/ gas station, and most grocery stores (not that I eat a lot of donuts).

- There is at least one Mom-and-Pop pizzaria in almost every single strip mall and shopping center (and I love pizza, yay!)

- All the little towns in Massachusetts have roads that lead to all the neighboring towns and those roads are named after the town they go to.

- The street signs very rarely tell you the street you are on–only the intersecting streets.

- The street you are on can change names at any time (and if you want to stay on the same street name, then you sometimes have to make turns).

- The asian food is better (?!) here than in Hawai`i

- All the bars and clubs have to stop serving drinks at 1:30am (Some remnant Purtian hold-over law).

- Goth is much bigger here than in Hawai`i.

Okay, so those are my observations. Now the particulars of current events…

I had a date planned with a very attractive female today, named Schenley, but that got pushed off til Wednesday (bleh). If I had to describe her, I think I’d say she 1) is very liberal 2) likes being her own self 3) values people that like being their own selves 4) is smart in the awake-and-aware sort of sense, 5) and is a small bit insecure (possibly a side effect of 2). Oddly enough, one of her friends, Jay, is a lead computer programmer for a famous company named Numega that wrote most crackers favorite windows debugger, and another one of her friends, Valerie, was studying to be a computer programmer in college (and Valerie’s brother and dad are both computer programmers).

In other news, I’m going to be having a bbq with some of my coworkers tomorrow–just a few of them, though. Most everyone else is in Europe right now, attending a GNOME conference. One of my coworkers who didn’t go to the conference, Rik van Riel, is going to be bringing some sugarcane vodka to the bbq, which sounds interesting. Of course, next week is going to be very interesting because the office which normally has like more than 50 people in it or something, will only have less than half that (I think).

Okay, let’s see….hmmm. Oh my apartment is completly awesome. It is a one bedroom, 800 square feet, and it is on a beautiful estate (88 acres in all). The place has two pools, several tennis courts, basketball courts, a health club, and massive amounts of parking, which is nice. It’s also close to the biggest retail district I’ve ever seen, and there is no tax in New Hampshire, so it’s sorta the shopping mecca for everyone from neighboring states. The only thing that my apartment is really missing is a bed, but I think that I will wait a while on that. I have this unbelievably comfortable and cool looking softa that has a queen sized sleeper bed hidden inside it which seems to be fine for me.

Okay, not sure what else to write, so I’ll just post more later.

I need to register my car. I was given a temporary 20-day, cardboard license plate, which has now expired and also deformed from the rain that happens every week or so. I’m going to do it first thing monday morning.